discord.py

Discord.py Warning command

I am trying to work on a warning command, and I was wondering if you could help me with it, I am trying to make it so that once I warn someone, it disposes it to a .json file, my code is as below:
@bot.command()
@commands.has_permissions(k…

Guessing game, discord.py bot

Im trying to make a discord bot guessing game (using python) but it keeps failing. I have looked at many similar posts and haven’t found anything that helps.
@bot.command(name=’play’)
async def play(ctx):
number = random.randint(1,100)

Discord.py warning

I’ve been working on a moderator discord bot. Made all the command except the warn command. Can anyone help me to make a warn command.
If the member (with manage member permission) types ?warn @user reason the bot will save the warning in …