Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eedaf1c71f | ||
|
|
70e4a84db3 | ||
|
|
443b92dfd3 | ||
|
|
e1be3218b3 | ||
|
|
dfd4ef9347 |
@@ -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.
|
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"])
|
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)
|
server = uvicorn.Server(config)
|
||||||
await server.serve()
|
await server.serve()
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ class RefreshCog(commands.Cog, name="Refresh Commands"):
|
|||||||
Args:
|
Args:
|
||||||
interaction (nextcord.Interaction): Interaction with the command.
|
interaction (nextcord.Interaction): Interaction with the command.
|
||||||
"""
|
"""
|
||||||
|
await interaction.response.defer()
|
||||||
await update_clan_messages(interaction.guild)
|
await update_clan_messages(interaction.guild)
|
||||||
await interaction.response.send_message(
|
await interaction.followup.send("Messages have been refreshed.", ephemeral=True)
|
||||||
"Messages have been refreshed.", ephemeral=True
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user