#Send Modal data in a channel

1 messages · Page 1 of 1 (latest)

eternal wedge
#

Can someone help me

class Newvid(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
        
    @slash_command(name="newvid")
    async def newvid(self, ctx: commands.Context):
        if ctx.user.guild_permissions.administrator:
            modal = NewVideo(self.bot)
            await ctx.interaction.response.send_modal(modal)

class NewVideo(Modal):
        def __init__(self, bot) -> None:
                super().__init__(title="New Video")
                self.add_item(InputText(label="link", placeholder="link"))
                self.bot = bot

        async def callback(self, interaction: discord.Interaction):
                channel = interaction.channel_id(1120033018225119322)
                await channel.interaction.response.send_message(f"**@everyone check out my new TikTok Video**\n{self.children[0].value}")
shrewd stump
#

what are you doing lol

#

read the error

eternal wedge
shrewd stump
#

read the error

#

whatever that line is supposed to do, it's wrong

eternal wedge
#

alright