Skip to content

Commit 87459c2

Browse files
authored
Fix belt attributions (#13)
1 parent 3ddb0f8 commit 87459c2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

bot/client.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
from tabnanny import check
2-
from unicodedata import name
31
import discord
42
from discord.ext import commands
5-
import traceback
63
from enum import Enum, unique
74

85
from bot import VERSION
@@ -69,7 +66,16 @@ async def promove(ctx, user, belt):
6966

7067
ninja = Ninja_data(guild, member)
7168

72-
if belt == ninja.current_belt().name:
69+
if belt == "Branco":
70+
71+
cinturao = get_role_from_name(guild, "Branco").id
72+
await member.add_roles(guild.get_role(cinturao),
73+
reason=None,
74+
atomic=True)
75+
76+
await ctx.send(f'{user} agora és cinturão {belt}')
77+
78+
elif belt == ninja.current_belt().name:
7379

7480
await ctx.send(
7581
f'<@{ctx.message.author.id}> esse já é o cinturão atual do ninja {user}'

0 commit comments

Comments
 (0)