Sanae6 / SmoOnlineServer

Official server for Super Mario Odyssey: Online
https://discord.gg/jYCueK2BqD
103 stars 24 forks source link

Bot fix (no more commands via DM) #32

Closed TheUbMunster closed 1 year ago

TheUbMunster commented 1 year ago

New behavior:

The server bot now no longer runs commands sent via dm (optional error message sent when dm'd, uncomment (hash)define at the top of DiscordBot.cs) If Config.CommandChannel isn't set, the bot will accept commands from any channel that isn't DM's (not recommended ofc) If Config.CommandChannel is set, the bot will only accept commands from the command channel

Also, settings.json now has "CommandChannel" and "LogChannel", logs are now sent to the log channel, and commands are to be sent from the command channel (or any non-dm channel if CommandChannel isn't specified).

Also, running commands with the bot via (at)Mentioning the bot now ignores leading whitespace (behavior before was that running commands via this method only worked if there was exactly one space between the end of the mention and the start of the command).