Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Commit 4580669

Browse files
committed
Only allow commands in guilds
1 parent 3abba19 commit 4580669

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TabletBot.Discord/Watchers/Commands/CommandMessageWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ IEnumerable<Type> commands
3535

3636
public async Task Receive(IMessage message)
3737
{
38-
if (message.Content.StartsWith(_settings.CommandPrefix) && !message.Author.IsBot)
38+
if (message.Channel is IGuildChannel && !message.Author.IsBot && message.Content.StartsWith(_settings.CommandPrefix))
3939
{
4040
try
4141
{

0 commit comments

Comments
 (0)