#Welcome Message not working

1 messages · Page 1 of 1 (latest)

solar bobcat
#

What's the interaction?

#

The part you have underlined. What's the interaction referencing

#

What do you get when you print wel[0]

solar bobcat
#

Looks fine. Just double check that that is the correct ID for the channel. It will only return None when the channel cannot be found

#

Correct how the channel ID is entered in the database

#

The rest appears fine, just get that part fixed.

#

Just execute a delete command to delete everything and start again.
DELETE FROM {table name}

Then put a check in place to see if guildID already exists. If it does then UPDATE otherwise INSERT.

You should probably make guildID unique too in the db

#

By using fetchone you are not going to get that entry

#

Delete all the rows in the table and start again making sure you don't duplicate on the entries

#

Just the table

#

?

#

The rows in the table

#

This column should be unique

#

Your channel ID is wrong again

#

Fix your code so it enters the right ID without having to manually change it

#

Hard to say without seeing how it's being entered

#

Can't see how it gets the channel. Scroll up

#

Still can't see what this is referencing

#

Debug to make sure the correct channel id is being sent to the database

solar bobcat
#

Is this channel.id being referenced from channel in the member_join event?

#

How do you ask the user what channel they would like to use?

#

In the modal you can try passing the channel as a parameter and referencing that

#

Example

class Modal(discord.ui.Modal):
        def __init__(self, channel: discord.TextChannel):
            super().__init__(title="Set your join Message")
            self.channel = channel

            ...
        # In callback use self.channel.id
          

# When initiating the modal
.. send_modal(Modal(channel))
solar bobcat
#

So what's the problem exactly?