Compare commits

...
Author SHA1 Message Date
imcompiling eedaf1c71f Don't need to refresh messages on bot start.
build_develop / build (push) Successful in 1m11s
2024-05-16 09:13:34 -04:00
imcompiling 70e4a84db3 Set uvicorn to listen on all addresses.
build_develop / build (push) Successful in 57s
2024-05-15 23:16:12 -04:00
imcompiling 443b92dfd3 Revert "Add expose to see if that fixes issue."
build_develop / build (push) Successful in 21s
This reverts commit e1be3218b3.
2024-05-15 20:43:19 -04:00
imcompiling e1be3218b3 Add expose to see if that fixes issue.
build_develop / build (push) Successful in 1m10s
2024-05-15 20:40:31 -04:00
imcompiling dfd4ef9347 Need to defer followup on refresh because it takes a while. 2024-05-15 17:27:35 -04:00
2 changed files with 3 additions and 5 deletions
+1 -2
View File
@@ -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()
+2 -3
View File
@@ -29,7 +29,6 @@ class RefreshCog(commands.Cog, name="Refresh Commands"):
Args:
interaction (nextcord.Interaction): Interaction with the command.
"""
await interaction.response.defer()
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)