Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import asyncio
- from discord.ext import commands
- from credits import token, ttt
- bot = commands.Bot(command_prefix="!")
- games = {"Action": ["Tomb Rider", "CS:GO"], "Strategy": ["Civilization", "Dota 2"]}
- # @bot.event
- # async def on_message(message):
- # if message.content == "Привет":
- # await message.channel.send("ДАРОВА КАК ЖИТУХА БРАТУХА??")
- # if message.content == "Почему мой бот не работает?":
- # await message.channel.send("ЧЕ с дуба рухнул вот же я пишу")
- # new_mes = message.content.lower().split(" ")
- # if 'игра' or 'игр' or 'игры' or 'игру' in new_mes:
- # await message.channel.send("Кто то сказал игра? Так давай сыграем?")
- @bot.command(name= "start")
- async def start(ctx):
- await ctx.send("Привет я твой первый discord Бот и готов на все!")
- @bot.command(name="info")
- async def info(ctx):
- await ctx.send("Создатель этого бота OtsoSilver#8291")
- @bot.command(name = "play")
- async def play(ctx, type_name):
- game = games[type_name]
- await ctx.send(f"Вы хотите сыграть в {game[random.randint(0,1)]}")
- @bot.command(name='timer')
- async def timer(ctx, number):
- number = int(number)
- message = await ctx.send(number)
- while number != 0:
- number -=1
- await message.edit(content = number)
- await asyncio.sleep(1)
- await message.edit(content = "Ended!!!")
- @bot.command(name = 'remind')
- async def remind(ctx, *args):
- await asyncio.sleep(int(args[-1]))
- await ctx.send(' '.join(args[0:-1]))
- bot.run(token)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement