diff --git a/discord_bot.py b/discord_bot.py index c94c296..355e366 100644 --- a/discord_bot.py +++ b/discord_bot.py @@ -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) diff --git a/dota.py b/dota.py index 5d48887..9795472 100644 --- a/dota.py +++ b/dota.py @@ -49,7 +49,7 @@ class Match(BaseModel): start_time = peewee.DateTimeField() duration = peewee.IntegerField() radiant_win = peewee.BooleanField() - party_size = peewee.IntegerField() + party_size = peewee.IntegerField(null=True) def serialize_match(self): try: