Compare commits
3 Commits
11e531fef2
...
webbeta
| Author | SHA1 | Date | |
|---|---|---|---|
| 448fc8aebe | |||
| 7dab0ed143 | |||
| a13748b833 |
12
main.py
12
main.py
@@ -1,3 +1,5 @@
|
||||
from datetime import time
|
||||
import datetime
|
||||
import discord
|
||||
import os
|
||||
from discord.ext import tasks
|
||||
@@ -42,6 +44,8 @@ async def on_ready():
|
||||
|
||||
@tasks.loop(seconds=5)
|
||||
async def task_loop():
|
||||
try:
|
||||
# print(str(datetime.datetime.now()) + ": Loop running.")
|
||||
await bot.change_presence(
|
||||
activity=discord.Activity(
|
||||
type=discord.ActivityType.watching,
|
||||
@@ -86,7 +90,11 @@ async def task_loop():
|
||||
)
|
||||
if value == "Eliminated":
|
||||
await channel.send(
|
||||
'Game **"' + game.name + '"**: ' + key + " has been eliminated."
|
||||
'Game **"'
|
||||
+ game.name
|
||||
+ '"**: '
|
||||
+ key
|
||||
+ " has been eliminated."
|
||||
)
|
||||
if value == "Turn unfinished":
|
||||
await channel.send(
|
||||
@@ -98,3 +106,5 @@ async def task_loop():
|
||||
)
|
||||
game.update_players()
|
||||
game.to_json()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user