Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext.commands import Bot
- from discord.ext import commands
- import asyncio
- import time
- Client = discord.Client()
- client = commands.Bot(command_prefix = "!")
- @client.event
- async def on_ready():
- print("Il BOT è connesso a Discord!")
- @client.event
- async def on_message(message):
- if message.content.upper().startswith('!PING'):
- userID = message.author.id
- await client.send_message(message.channel, "<@%s> Pong!" % (userID))
- if message.content.upper().startswith('!SAY'):
- if message.author.id == "id(i insert after)":
- args = message.content.split(" ")
- await client.send_message(message.channel, "%s" % (" ".join(args[1:])))
- else:
- await client.send_message(message.channel, "Non hai il permesso per eseguire questo comando.")
- client.run("key(i insert after)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement