fix not finding message
This commit is contained in:
3
main.py
3
main.py
@@ -9,6 +9,7 @@ bot = discord.Bot()
|
||||
with open('storage.json') as user_file:
|
||||
storage = json.loads(user_file.read())
|
||||
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
bot.add_view(CounterView())
|
||||
@@ -37,7 +38,7 @@ class CounterView(discord.ui.View): # Create a class called MyView that subclas
|
||||
storage["counter"] = storage["counter"] + 1
|
||||
with open('storage.json', 'w') as f:
|
||||
json.dump(storage, f)
|
||||
message = bot.get_message(storage["message_id"])
|
||||
message = bot.get_message(int(storage["message_id"]))
|
||||
await message.edit(embed=create_embed(storage["counter"]), view=CounterView())
|
||||
await interaction.response.send_message("Fertig", ephemeral=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user