Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- import requests
- import json
- import os
- from colorama import Fore, init
- from os import system
- init()
- bot = commands.Bot(command_prefix='!', description="ayuda bot") #Comando
- bot.remove_command("help") # Borra el comando por defecto !help
- @bot.command()
- async def codigo(ctx, *, codigo):
- response = requests.get(f"https://fortnite-api.com/v2/creatorcode?name={codigo}")
- try:
- CodigoCreador = response.json()['data']['status']
- except KeyError:
- CodigoCreador="el codigo no existe"
- await ctx.send(f'{CodigoCreador}'.replace("ACTIVE","el código existe"))
- #BOT CREADO POR JOSE89FCB
- #TWITTER.COM/JOSE89FCB
- @bot.event
- async def on_ready():
- print("BOT listo!")
- bot.run('') #OBTEN UN TOKEN EN: https://discord.com/developers/applications
Advertisement
Add Comment
Please, Sign In to add comment