feat(discord_bot): Add active flag to friend creation

This commit is contained in:
Ching 2024-02-08 16:31:37 +08:00
parent be38f4a4a1
commit 0e9cded73c
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
{
"conventionalCommits.scopes": [
"models"
"models",
"discord_bot"
]
}

View File

@ -82,7 +82,7 @@ async def add_friend(ctx, steam_id, name):
if friend:
await ctx.respond(content=f'已经存在 {steam_id} {name}')
else:
friend = dota.Friend.create(steam_id=steam_id, name=name)
friend = dota.Friend.create(steam_id=steam_id, name=name, active=True)
await ctx.respond(content=f'添加成功 {steam_id} {name}')
@bot.command(description='禁用朋友', name='deactivate_friend')