Limit /at commands to chat

This commit is contained in:
Nikolay Kochulin 2019-11-17 12:12:59 +00:00
parent dc58447ad4
commit 3c3b34fe13
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ namespace JetKarmaBot.Commands.AwardTypeManage
return true; return true;
} }
AwardType awardType = await db.AwardTypes.FirstOrDefaultAsync(x => x.CommandName == cmd.Parameters[0]); AwardType awardType = await db.AwardTypes.FirstOrDefaultAsync(x => x.CommandName == cmd.Parameters[0] && x.ChatId == args.Message.Chat.Id);
if (awardType == null) if (awardType == null)
{ {

View File

@ -71,7 +71,7 @@ namespace JetKarmaBot.Commands.AwardTypeManage
return true; return true;
} }
AwardType awardType = await db.AwardTypes.FirstOrDefaultAsync(x => x.CommandName == cmd.Parameters[0]); AwardType awardType = await db.AwardTypes.FirstOrDefaultAsync(x => x.CommandName == cmd.Parameters[0] && x.ChatId == args.Message.Chat.Id);
if (awardType == null) if (awardType == null)
{ {