From 74eec18240efcc2ee8988cdd4c3e4ea63ee7b5ba Mon Sep 17 00:00:00 2001 From: Ching Date: Thu, 8 Feb 2024 16:31:37 +0800 Subject: [PATCH] feat(discord_bot): Add active flag to friend creation --- .vscode/settings.json | 3 ++- discord_bot.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3cdd50f..34981f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "conventionalCommits.scopes": [ - "models" + "models", + "discord_bot" ] } diff --git a/discord_bot.py b/discord_bot.py index 74910d9..2f3bdbe 100644 --- a/discord_bot.py +++ b/discord_bot.py @@ -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')