Compare commits
9
Commits
7333100b1d
...
v1.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370bd71154 | ||
|
|
cb3eb4b09b | ||
|
|
c39e2c137b | ||
|
|
eedaf1c71f | ||
|
|
70e4a84db3 | ||
|
|
443b92dfd3 | ||
|
|
e1be3218b3 | ||
|
|
dfd4ef9347 | ||
|
|
094a22f5e7 |
@@ -1,5 +1,9 @@
|
||||
# Dakiny Bot
|
||||
|
||||
Bot assumes that it always did the step before it. If the step before an action didn't happen, behavior is undefined.
|
||||
Dakiny clan's own discord bot!
|
||||
|
||||
|
||||
### Assumptions
|
||||
- For Elections: Bot assumes that it always did the step before it. If the step before an action didn't happen, behavior is undefined.
|
||||
Object creation in the middle of a cycle is only there for restarting the bot. All relevant information should already
|
||||
exist in the database.
|
||||
@@ -33,9 +33,8 @@ class ClanMessages(commands.Cog, name="Clan Messages"):
|
||||
"""
|
||||
Triggers when the bot is in ready state. Adds the webhook listener to FastAPI and serves.
|
||||
"""
|
||||
await self.update_messages()
|
||||
app.add_api_route("/messages/", self.update_messages, methods=["POST"])
|
||||
config = uvicorn.Config(app=app, port=5000, log_level="info")
|
||||
config = uvicorn.Config(app=app, host="0.0.0.0", port=5000, log_level="info")
|
||||
server = uvicorn.Server(config)
|
||||
await server.serve()
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ class RefreshCog(commands.Cog, name="Refresh Commands"):
|
||||
Args:
|
||||
interaction (nextcord.Interaction): Interaction with the command.
|
||||
"""
|
||||
await interaction.response.defer(ephemeral=True)
|
||||
await update_clan_messages(interaction.guild)
|
||||
await interaction.response.send_message(
|
||||
"Messages have been refreshed.", ephemeral=True
|
||||
)
|
||||
await interaction.followup.send("Messages have been refreshed.", ephemeral=True)
|
||||
|
||||
Reference in New Issue
Block a user