fix(bot.py, dota.py): 修复 opendota 接口返回时间太长导致 discord 报错的问题;修改 Match.party_size 为 nullable
修复 opendota 接口返回时间太长导致 discord 报错的问题;修改 Match.party_size 为 nullable Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
parent
a8825db196
commit
0f4f29332c
@ -42,6 +42,7 @@ async def send_message(channel):
|
||||
|
||||
@bot.command(description="获取最近战绩", name='recent_matches') # this decorator makes a slash command
|
||||
async def get_friends_recent_matches(ctx, name, match_count=5): # a slash command will be created with the name "ping"
|
||||
await ctx.defer()
|
||||
logger.info(f"get_friends_recent_matches {name} {match_count}")
|
||||
friends = dota.Friend.filter(name=name)
|
||||
match_count = int(match_count)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user