mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-21 18:55:17 +00:00
changed isPrivate check to type check of "is DiscordDmChannel"
This commit is contained in:
parent
d828a704c1
commit
b6e634ada4
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
#define SEND_RESP_TO_BAD_REQ
|
#define SEND_RESP_TO_BAD_REQ //should the bot send a message to people who attempt to run a command from an invalid location? (Comment out to disable)
|
||||||
#define LOG_BAD_REQ
|
#define LOG_BAD_REQ //should the bot log aformentioned invalid requests?
|
||||||
|
|
||||||
using DSharpPlus;
|
using DSharpPlus;
|
||||||
using DSharpPlus.Entities;
|
using DSharpPlus.Entities;
|
||||||
|
@ -103,7 +103,7 @@ public class DiscordBot {
|
||||||
Logger.Warn("You probably should set your LogChannel in settings.json");
|
Logger.Warn("You probably should set your LogChannel in settings.json");
|
||||||
warnedAboutNullLogChannel = true;
|
warnedAboutNullLogChannel = true;
|
||||||
}
|
}
|
||||||
if (args.Channel.IsPrivate) {
|
if (args.Channel is DiscordDmChannel) {
|
||||||
#if LOG_BAD_REQ
|
#if LOG_BAD_REQ
|
||||||
Logger.Warn("A command was sent to the bot in a non-public channel. This will not be processed. (Send commands in the specified LogChannel in settings.json or only in public channels)");
|
Logger.Warn("A command was sent to the bot in a non-public channel. This will not be processed. (Send commands in the specified LogChannel in settings.json or only in public channels)");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue