Closed tarto-dev closed 8 months ago
An implements with #10 would be nice to improve useability
Sample code who should do the trick (not tested so far because #10 trends to fail and remove bot listener)
from disnake.ext import commands
import disnake
class ContextMenuCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.message_command(name="Add as Tag")
async def add_as_tag(self, inter: disnake.MessageCommandInteraction):
selected_message_content = inter.target.content
modal = AddTagModal(server_id=inter.guild_id, prefill_message=selected_message_content)
await inter.response.send_modal(modal)
Check API to implements contextual commands such as
add
andupdate
on existing messages sent by other discord users.Add
authored by
and a direct link to post aswel if allowed by API.