Skip to content

Discord Integration

Glazelf edited this page Oct 9, 2020 · 43 revisions

Setup

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.

Before Starting

When you Start your bots via the GUI, 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.

Config

When SysBot.AnimalCrossing.exe is run for the first time, a templateconfig.json will be created in the same folder, and look as follows:
Config.json

Config fields

  • AcceptingCommands: Boolean indicating whether or not your bot will accept commands, you will most likely want to leave this on true.
  • Name: The name of your bot, seperate from the username and nickname your bot has in Discord.
  • 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 $.
  • RoleCustom: Role name of the role that is required for a user to have before they can use the bot.
    • Leaving this empty will make it so no role is required.
  • 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.
  • 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.
    • Since v1.5, the offset should be 2881640512. This offset still works with the current version (v1.5.1).
  • RequireValidInventoryMetadata: Whether or not the inventory offset needs to be valid.
    • Leave this on true unless you really know what you're doing.
  • 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.
    • 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 makes drop item the first option when selecting an item in-game, making the task more generic and faster.
    • WrappingPaper: Indicates which type of wrapping paper should be used.
  • AllowClean: Boolean indicating whether or not $clean can be used to pick up items surrounding the player character.
  • IP: The IP that should be connected to. Y
    • 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.

Config Example

For comparison, here's what my config.json looks like after filling out all the fields:
Config.json

Clone this wiki locally