import random
import asyncio
import aiohttp
import json
from discord import Game
from discord.ext.commands import Bot
import discord
TOKEN = 'Token'
client = discord.Client()
botnum = 0
@client.event
async def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
if message.content.startswith('PeriBot'):
msg = "I'm Busy! D:<".format(message)
await client.send_message(message.channel, msg)
if discord.message and botnum == 20
msg = "You Clods are so loud!".format(message)
await client.send_message(message.channel, msg)
set botnum == 0
else:
botnum + 1
@client.event
async def on_ready():
print('Online and Ready to Play!')
print(client.user.name)
print(client.user.id)
await client.change_presence(game=discord.Game(name="With Emotions"))
print('------')
client.run("Token")
I want it to say a message every 20 messages but I am unsure how. I have somthing named botnum and it is == 0 and if there isn't 20 botnum's then it adds 1 to the botnum. If there is 20 it says a msg. I want it to add 1 to botnum every msg.