Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discord Bot not working
#1
For some reason once I added a music function to my discord bot it stopped working, can anyone tell me why? My code is;
# FangBot by SoulWolfX#1057 https://www.youtube.com/c/SoulWolfGamer for wolfnation

startup_extensions = ["Music"]
bot = commands.Bot(command_prefix='-')



@bot.event
async def on_ready():
    print ("FangBot innitialized. hello wolfnation")

class Main_Commands ():
    def __init__ (self, bot):
self.bot = bot

@client.event
async def wait_until_login():
    await client.change_presence(game=discord.Game(name='WolfNation bot made by http://bit.ly/2EzoA8e'))
@bot.command(pass_context=True)

async def ping(ctx):
    await bot.say(":ping_pong: Pong")
    print ("user has pinged")
    

    
    async def pong(ctx):
    await bot.say(":ping_pong: Ping")
    print ("user has ponged")




@client.command(pass_context=True)
    async def yt(ctx):
        url = ctx.message.content
        url = url.strip('!yt ')

        author = ctx.message.author
        voice_channel = author.voice_channel
        vc = await client.join_voice_channel(voice_channel)

        player = await vc.create_ytdl_player(url)
        player.start()



@bot.command(pass_context=True)
async def info(ctx, user: discord.Member):
    await bot.say("The users name is (and no its not john cena): {}".format(user.name))
    await bot.say("The users ID is: {}".format(user.id))
    await bot.say("The users status is: {}".format(user.status))
    await bot.say("The users rank is: {}".format(user.top_role))
    await bot.say("The user joined at: {}".format(user.joined_at))

@bot.command(pass_context=True)
async def kick(ctx, user: discord.Member):
    await bot.say(":boot: Cya, {}. don't wanna be ya.".format(user.name))
    await bot.kick(user)
@bot.command(pass_context=True)
async def ban(ctx, user: discord.Member):
    await bot.say(":hammer: Dirty cheater {}. FACE THORS MIGHTY BAN HAMMER!".format(user.name))
    await bot.ban(user)


if __name__ == "__main__":
    for extension in startup_extension(extension)
    except Exception as e:
        exc = '{}: {}'.format(type(e).__name__, e)
        print('Failed to load extension {}\n{}'.format(extension, exc))


    
    await client.change_presence(game=discord.Game(name="WolfNation bot made by http://bit.ly/2EzoA8e"))

bot.run("PLACEHOlDER SO NO ONE STEALS MY BOT TOKEN")
Reply


Messages In This Thread
Discord Bot not working - by SoulWolfX - Mar-18-2018, 08:27 PM
RE: Discord Bot not working - by j.crater - Mar-18-2018, 08:29 PM
RE: Discord Bot not working - by SoulWolfX - Mar-18-2018, 08:41 PM
RE: Discord Bot not working - by buran - Mar-18-2018, 09:17 PM
RE: Discord Bot not working - by SoulWolfX - Mar-18-2018, 09:21 PM
RE: Discord Bot not working - by buran - Mar-19-2018, 04:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 3,564 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy
  discord bot not working lolteam 1 9,562 Aug-31-2017, 11:30 AM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020