I'm working on a bot in discordpy. I have a discord server for only people in school. Everyone has a school email, and I want to make a bot that can send a code to verify them.

Where I am stuck is that when the bot askes for an email, it wont let me DM the bot back. In discord I'm being told that my message can't be delivered, because we don't share any mutual servers, etc. There are no errors in the python log. Also, when a new person joins, they are banned right away so they can't read or write anything. All of the verification is happening in DM's. The person is only unbanned after they've been verified.

I have tried googling everywhere, but I just cannot find an answer. If there is one that already exists, could you please point me to it?

Is there a solution to this? Or should I try something else, like blocking the user from reading all channels except one?

Thank you so much for your help! It really means a lot to me. ;D