I'm trying to make a Python Discord Bot that firstly can delete messages within a channel. I wanted it to be Terminator 3 themed so it would start out by the user saying Skynet then the bot asks to activate Y or N? and when the user types Y it would delete all the messages in the channel if the user typed N it would say judgment day is inevitable. any help would be greatly appreciated.
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
token = 'Token'
Client = discord.Client()
client = commands.Bot(command_prefix = '!')
@client.event
async def on_ready():
print("Skynet Online")
@client.event
async def on_message(message):
if message.content == 'skynet':
await client.send_message(message.channel, 'Execute Y/N?')
@asyncio.coroutine
async def delete_messages(messages):
if message.content == 'Y':
await client.delete_messages()
client.run('Token')
Client.wait_for_message
to have interactive commands. – Patrick Haugh