Skip to content

Commit

Permalink
feat: 為新年提高更新年進度頻率
Browse files Browse the repository at this point in the history
Signed-off-by: Allen95Wei <allen95wei@gmail.com>
  • Loading branch information
Alllen95Wei committed Dec 31, 2024
1 parent 79dcee7 commit cf235d7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cogs/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,21 +1152,21 @@ def get_year_process():
async def set_presence_as_year_process(self):
year_process = self.get_year_process()
current_year = datetime.datetime.now(tz=now_tz).year
if datetime.datetime.now(tz=now_tz).second == 0:
if datetime.datetime.now(tz=now_tz).second % 15 == 0:
activity = discord.Activity(
name=f"{current_year}年進度:{year_process} % 完成!",
type=discord.ActivityType.watching,
)
await self.bot.change_presence(
activity=activity, status=discord.Status.online
)
elif datetime.datetime.now(tz=now_tz).second == 30:
activity = discord.Activity(
name=get_RPC_context(), type=discord.ActivityType.playing
)
await self.bot.change_presence(
activity=activity, status=discord.Status.online
)
# elif datetime.datetime.now(tz=now_tz).second == 30:
# activity = discord.Activity(
# name=get_RPC_context(), type=discord.ActivityType.playing
# )
# await self.bot.change_presence(
# activity=activity, status=discord.Status.online
# )

@tasks.loop(seconds=10)
async def give_voice_exp(self): # 給予語音經驗
Expand Down

0 comments on commit cf235d7

Please sign in to comment.