From 7189257e7adffe0aef2b244169a38a88cc3cd184 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sun, 20 Dec 2020 00:13:23 -0500 Subject: [PATCH] added introduction command, to be run by owner only --- the-prestige.sln | 2 ++ the_prestige.py | 35 +++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/the-prestige.sln b/the-prestige.sln index ecf4890..4f61ef0 100644 --- a/the-prestige.sln +++ b/the-prestige.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.30011.22 MinimumVisualStudioVersion = 10.0.40219.1 Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "the-prestige", "the-prestige.pyproj", "{2738449B-4B76-4ED0-AA18-3494AAA9E184}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4BD2E319-AA17-4FDB-893E-675296EB8F4B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/the_prestige.py b/the_prestige.py index f980c2a..b2387df 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -30,20 +30,35 @@ async def on_ready(): @client.event async def on_message(msg): - command = False + command_b = False for prefix in config()["prefix"]: if msg.content.startswith(prefix): - command = True - command_s = msg.content.split(prefix, 1) - if not command: + command_b = True + command = msg.content.split(prefix, 1)[1] + print(command) + if not command_b: return - if msg.channel.id == config()["soulscream channel id"]: - #try: - await msg.channel.send(ono.get_stats(msg.author.nick)) - #except TypeError: - #await msg.channel.send(ono.get_stats(msg.author.name)) - + if msg.author.id in config()["owners"] and command == "introduce": + await introduce(msg.channel) + + elif msg.channel.id == config()["soulscream channel id"]: + try: + await msg.channel.send(ono.get_stats(msg.author.nick)) + except TypeError: + await msg.channel.send(ono.get_stats(msg.author.name)) + + + +async def introduce(channel): + text = """**Your name, favorite team, and pronouns**: Matteo Prestige, CHST, they/them ***only.*** There's more than one of us up here, after all. +**What are you majoring in (wrong answers only)**: Economics. +**Your favorite and least favorite beverage, without specifying which**: Vanilla milkshakes, chocolate milkshakes +**Favorite non-Mild Low team**: The Mills. We hope they're treating Ren alright. +**If you were a current blaseball player, who would you be**: We refuse to answer this question. +**Your hobbies/interests**: Minigolf, blaseball, felony insider trading. +""" + await channel.send(text) client.run(config()["token"]) \ No newline at end of file