-
-
Notifications
You must be signed in to change notification settings - Fork 14
Discord Integration
Create a new Discord Application and Bot for your server on Discord's Developer Portal.
To invite the Bot to your server, you must generate an OAuth2 URL with the correct permissions. Click on the OAuth2 tab in the sidebar, select bot under "Scopes," and grant your bot permissions. You will need at minimum:
- Send Messages
- Read Message History
- Embed Links (for the neat embeds such as in
$info
.)
Under the Bot tab, make your bot private to prevent other people from inviting it to their servers and using your Switch.
- Enable
Privileged Gateway Intents
andServer Members Intent
under the same tab.
When you start the application by clicking the .exe
, the Discord bot will be launched.
Configure the bot's settings on your server. If you only want it in a few specific channels, remove all the permissions on the bot's role itself and add the role to specific channels only. Ensure that you do not have any other roles that are restricting the bot's permissions (including the "everyone" role), and you enter any extra codes needed if you have 2FA enabled.
NOTE: You will need to restart the .exe
for changes to take affect, after restarting you will also need to set the dodo code again.
When SysBot.AnimalCrossing.exe
is run for the first time, a template config.json
and discord.json
will be created in the same folder. They will look as follows:
Config.json:
Discord.json:
-
AcceptingCommands: Boolean indicating whether or not your bot will accept commands, you will most likely want to leave this on
true
. - SkipConsoleBotCreation: Boolean indicating whether or not your bot will try to connect to a Switch, mostly for testing purposes for features that don't require a Switch to be connected
-
Offset: Inventory offset. Don't change this unless you're manually updating it for a new game update.
- For the current version (v1.7.0) the offset should be
2900022576
if you have one player profile on your island. - If you have more than one player profile, use this formula to determine the offset:
2900022576 + (1106856 * (number of profiles on your island - 1))
- For the current version (v1.7.0) the offset should be
-
RequireValidInventoryMetadata: Whether or not the inventory offset needs to be valid.
- Leave this on
true
unless you really know what you're doing.
- Leave this on
-
RequireJoin: Whether or not members are forced to use
$join
before using other commands. -
MaxVisitorCount: The max amount of visitors that can be on your island at once.
- Only counts people who used
$join
.
- Only counts people who used
-
DropConfig: A subsection of the config file for dropping related settings.
-
AutoClean: Indicates whether or not the items surrounding the player character should be picked up while idle.
- This may cause furniture close to the player character to be picked up when alone on the island.
- NoActivitySeconds: The time in seconds before the bot autocleans if enabled.
- MaxDropCount: The max amount of items users can drop in a single command.
- PickupCount: The amount of items to pick up when cleaning.
-
WrapAllItems: Boolean indicating whether or not all items should be wrapped
- Default is
yes
since this makesdrop item
the first option when selecting an item in-game, making the task more generic and faster.
- Default is
- WrappingPaper: Indicates which type of wrapping paper should be used.
-
AutoClean: Indicates whether or not the items surrounding the player character should be picked up while idle.
-
FieldItemConfig: A subsection of the config related to spawning items.
-
FieldItemOffset: Offset to load field items from. For the current version (v1.6.0) this should be
2881463948
. -
FieldItemLayerPath: Path to a dumped
.nhl
file from NHSE. - FullRefreshCooldownMinutes: How often the bot should refresh the field.
-
InjectFieldItemLayer: Whether the bot should inject the
.nhl
file provided over your current layer. - InjectFieldItemRequest:
- MaxSpawnCount: How many items can be spawned per message.
- SpawnMaxHeight: The max vertical height of a drop.
- SpawnSpacingX: Amount of tiles between drops on the X axis.
-
SpawnSpacingY: Amount of tiles between drops on the Y axis.
- Must be equal to or higher than
SpawnMaxHeight
.
- Must be equal to or higher than
-
SpawnMinX: The minimum amount of tiles there need to be between your spawn and the left border.
- For easy reading of tiles, use NHSE to easily navigate your map and see coordinates.
- SpawnMinY: The minimum amount of tiles there need to be between your spawn and the top border.
- SpawnMaxX: The minimum amount of tiles there need to be between your spawn and the right border.
- SpawnMaxY: The minimum amount of tiles there need to be between your spawn and the bottom border.
-
Mode: The shape your spawn should try to make.
-
0
: Fills vertical untill it hitsSpawnMaxHeight
length, then creates a second vertical line to the right. -
1
: Tries to create a square. -
2
: Vertical columns only.
-
-
FieldItemOffset: Offset to load field items from. For the current version (v1.6.0) this should be
-
AllowClean: Boolean indicating whether or not
$clean
can be used to pick up items surrounding the player character. -
AllowValidate: Boolean indicating whether or not
$validate
can be used to validate the inventory offset. - RestartOnCrash: Boolean indicating whether or not the bot should try to restart and reconnect on a crash.
- MaximumRestarts: The maximum amount of times the bot should try to restart after a crash before giving up.
- UptimeTreshold: Amount of time the bot must be connected before considered stable.
-
Protocol: Determines which protocol the bot will use to connect to your switch.
-
0
: Wireless through sys-botbase using theIP
you provide below. -
1
: USB through USB-botbase.
-
-
IP: The IP that should be connected to.
- You can find this by going to the Homebrew Menu on your Switch and pressing Y.
- Port: Port the bot will try to connect to, do not change this.
-
Name: The name of your bot, seperate from the username and nickname your bot has in Discord.
- This will also display in the playing status of your bot. It will say
Playing
followed by whatever you changed this variable to.
- This will also display in the playing status of your bot. It will say
-
Token: The token of your Discord application, to request a token go to Discord's Developer Portal.
- Do not share this token with other people, as it will allow them to run their own code on your bot account.
-
Prefix: Character before your message that indicates it's a command.
- Default is
$
.
- Default is
-
RoleUseBot: Name of the role required to use bot commands other than
$help
and$info
.- Leaving this as the default
@everyone
will make it so no role is required.
- Leaving this as the default
-
Channels: List of channel IDs in which commands may be used.
- Leaving this empty causes commands to be usable in any channel.
-
Users: List of user IDs that are allowed to use commands.
- Leaving this empty causes anyone to be able to use commands.
-
Sudo: List of user IDs that are granted sudo access, allowing them to use commands in the Control Module.
- A list of commands can be found on the Discord Commands page.
- ModuleBlacklist: List of modules you want to disable.
For comparison, here's what my config.json
and discord.json
looks like after filling out all the fields:
Config.json:
Discord.json: