Add activity status

Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
Ari Archer 2022-08-23 06:49:19 +03:00
parent 74b0253d8b
commit c8433199a0
Signed by untrusted user who does not match committer: ari
GPG key ID: A50D5B4B599AF8A2

View file

@ -35,6 +35,7 @@ CONFIG: Dict[str, Any] = {
"logging": True,
"sh-timeout": 10,
"chunk-limit": 4,
"playing": "",
}
CONFIG_PATH: str = "config.json"
GLOBAL_STATE: Dict[str, Any] = {"exit": 0}
@ -515,6 +516,11 @@ class Bot(discord.Client):
log(f"Bot loaded, I am {self.user}")
await self.parser._send_message(CONFIG["hello-message"])
log("Changing activity status")
await self.change_presence(
activity=discord.Game(name=CONFIG["playing"])
)
async def on_message(self, message) -> None:
if message.author.bot or not any(
message.content.startswith(p)