fix & improve emote voting
parent
c9763fb3b7
commit
a71b0b5703
|
@ -108,3 +108,4 @@ venv.bak/
|
||||||
|
|
||||||
# muh token is stored as plain text ehehehehe
|
# muh token is stored as plain text ehehehehe
|
||||||
token.txt
|
token.txt
|
||||||
|
config.json
|
||||||
|
|
11
bot.py
11
bot.py
|
@ -106,11 +106,14 @@ async def addEmote(ctx, emote_name: str):
|
||||||
|
|
||||||
vote_passed = await take_vote(ctx, "Add emoji `{}`?".format(emote_name), EMOTE_VOTE_TIME, MIN_EMOTE_VOTERS)
|
vote_passed = await take_vote(ctx, "Add emoji `{}`?".format(emote_name), EMOTE_VOTE_TIME, MIN_EMOTE_VOTERS)
|
||||||
|
|
||||||
# if all_in_favor > not_in_favor and all_in_favor > MIN_EMOTE_VOTERS:
|
|
||||||
await ctx.send(embed=imgfun(msg, url))
|
|
||||||
if vote_passed:
|
if vote_passed:
|
||||||
file_bytes = await ctx.message.attachments[0].read()
|
try:
|
||||||
await ctx.guild.create_custom_emoji(name=emote_name, image=file_bytes)
|
file_bytes = await ctx.message.attachments[0].read()
|
||||||
|
await ctx.guild.create_custom_emoji(name=emote_name, image=file_bytes)
|
||||||
|
await ctx.send("`Emote {0} added!` :{0}:".format(emote_name))
|
||||||
|
except:
|
||||||
|
await ctx.send(":warning: `There was an error adding emote {}.`".format(emote_name))
|
||||||
|
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def shibe(ctx):
|
async def shibe(ctx):
|
||||||
|
|
Loading…
Reference in New Issue