You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Create a `.env` file in the root directory and add the following variables:
24
+
25
+
```bash
26
+
TOKEN=your-token-here
27
+
EMOJI=your-emoji-here
28
+
```
29
+
30
+
Create a new application on the [Discord Developer Portal](https://discord.com/developers/applications) and copy the token, then add forward.png as emoji to the application. (bot is intended to support user install)
awaitinteraction.followup.send('Message saved. Now, use the `/send` command to send it to another channel.')
23
+
return
24
+
classAskButton(discord.ui.Button):
25
+
asyncdefcallback(self, ctx: discord.Interaction):
26
+
ifself.custom_id=='yes':
27
+
iflen(messages[ctx.user.id]) <10:
28
+
messages[ctx.user.id].append(message)
29
+
awaitctx.response.edit_message(content='Message added to the list. Now, use the `/send` command to send all messages to another channel.',view=None)
30
+
else:
31
+
awaitctx.response.send_message(content='You have reached the maximum limit of 10 messages. Please send the messages you have saved using the `/send` command or overwrite.')
32
+
return
33
+
messages[ctx.user.id] = [message]
34
+
awaitctx.response.edit_message(content='Message saved. Now, use the `/send` command to send it to another channel.', view=None)
awaitinteraction.followup.send('You have already saved a message. Would you like to add it to the list?\n-# NOTE: You can save up to 10 messages. Only first image will be visible as image.', view=view)
40
+
return
41
+
awaitinteraction.followup.send('You have already saved a message. Would you like to add it to the list?\n-# NOTE: You can save up to 10 messages.', view=view)
42
+
43
+
@tree.command(description='Send the saved message(s) to another channel')
44
+
@app_commands.user_install()
45
+
asyncdefsend(ctx: discord.Interaction):
46
+
ifctx.user.idnotinmessages:
47
+
awaitctx.response.send_message('You have not saved any messages to send. Use context menu option `Forward`', ephemeral=True)
0 commit comments