Bug fixes in polls, emoji stuff and quotes

This commit is contained in:
Runebaas 2017-11-08 19:19:43 +01:00
parent f96954a7e1
commit 0e217b8db1
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
4 changed files with 39 additions and 10 deletions

View file

@ -55,6 +55,11 @@ namespace Geekbot.net.Commands
await ReplyAsync("You can't save your own quotes...");
return;
}
if (user.IsBot)
{
await ReplyAsync("You can't save quotes by a bot...");
return;
}
var lastMessage = await getLastMessageByUser(user);
var quote = createQuoteObject(lastMessage);
var quoteStore = JsonConvert.SerializeObject(quote);
@ -81,6 +86,11 @@ namespace Geekbot.net.Commands
await ReplyAsync("You can't save your own quotes...");
return;
}
if (message.Author.IsBot)
{
await ReplyAsync("You can't save quotes by a bot...");
return;
}
var quote = createQuoteObject(message);
var quoteStore = JsonConvert.SerializeObject(quote);
redis.SetAdd($"{Context.Guild.Id}:Quotes", quoteStore);