1) To make the bot give a member a role when they join, you need to have add_roles()
in your on_member_join
event. This can be accomplished with
@bot.event
async def on_member_join(member):
role = discord.utils.get(member.server.roles, id="<role ID>")
await bot.add_roles(member, role)
2) To have the role be customized for each server, you would need some file to hold the server id, and the role id to be given when the user joins (I personally would use a .db
file, and sqlite3 to edit it from python, but you can do whatever you want).
You would also need to slightly edit the on_member_join
example I gave to select the role id based on the member.server.id
from the file, and use the role id in discord.utils.get()
3) To have the bot DM anyone the default help messages, add pm_help=True
to your Bot()
parameters. To have part of your commands the average user and all sent to only the owner, you will need to make a new help command. To do this, you will need to add bot.remove_command('help')
near the top of your code, and then create a command called help. Then, to have commands only sent to the owner, add
if ctx.message.author.id == ctx.message.server.owner.id:
await bot.send_message(ctx.message.author, <help message>)
to your help command.
Hope this helps