Skip to content

Commit 40d07a5

Browse files
committed
Update main.py
1 parent 4faa8de commit 40d07a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ async def updateserverstatus():
230230
db[str(guild.id)] = default_guilddata_item
231231
else:
232232
# テキストチャンネルの名前にステータスインジケーターを設定
233-
if ch_name[0] in statusindicator.List: ch_name = ch_name[1:]
234-
if db[str(guild.id)]["server_status_message"]["status_indicator"] == True: await msg.channel.edit(name=serverstatus.indicator + ch_name)
233+
try:
234+
if ch_name[0] in statusindicator.List: ch_name = ch_name[1:]
235+
if db[str(guild.id)]["server_status_message"]["status_indicator"] == True: await msg.channel.edit(name=serverstatus.indicator + ch_name)
236+
except Exception as e:
237+
logging.error(f"ギルド {guild.name} のステータスインジケーターの更新に失敗: {e}")
235238

236239
await msg.edit(embeds=await generateserverstatusembed(loc))
237240
except Exception as e:

0 commit comments

Comments
 (0)