Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkeyyy committed Mar 13, 2023
1 parent 4faa8de commit 40d07a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ async def updateserverstatus():
db[str(guild.id)] = default_guilddata_item
else:
# テキストチャンネルの名前にステータスインジケーターを設定
if ch_name[0] in statusindicator.List: ch_name = ch_name[1:]
if db[str(guild.id)]["server_status_message"]["status_indicator"] == True: await msg.channel.edit(name=serverstatus.indicator + ch_name)
try:
if ch_name[0] in statusindicator.List: ch_name = ch_name[1:]
if db[str(guild.id)]["server_status_message"]["status_indicator"] == True: await msg.channel.edit(name=serverstatus.indicator + ch_name)
except Exception as e:
logging.error(f"ギルド {guild.name} のステータスインジケーターの更新に失敗: {e}")

await msg.edit(embeds=await generateserverstatusembed(loc))
except Exception as e:
Expand Down

0 comments on commit 40d07a5

Please sign in to comment.