stampixel / Kahoot-Spammer

It spams Kahoot games, what else. Bots will not random answer questions, so I recommend spamming on the loading screen, might add the ability to randomly answer questions in the future.
4 stars 4 forks source link

YO #5

Open KeparYTbcc opened 2 years ago

KeparYTbcc commented 2 years ago
Ignoring exception in command kahootraid:
Traceback (most recent call last):
  File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "F:\mee6 leveler\test.py", line 217, in kahootraid
    bot = client()
TypeError: 'Client' object is not callable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'Client' object is not callable
KeparYTbcc commented 2 years ago
async def kahootraid(ctx , * , arg=""):
    await ctx.message.delete()
    if arg == "":
        await ctx.send('Please enter a Valid Game pin', delete_after=10.0)
        await ctx.send('Usage: K-kahootraid 123456', delete_after=10.0)
    elif len(arg) > 15:
        await ctx.message.delete()
        await ctx.send('That\'s too long!', delete_after=3.0)
    else:
        bot = client()

        def spambots():
            gameid = arg
            botamount = "200"
            custom_username = "Kolhax"
            def joingame():
                username = (custom_username + str(random.randint(1, 10000)))
                bot.join((gameid), username)

                def joinHandle():
                    pass

                bot.on("joined", joinHandle)
                print("Joined game"+gameid+"with username"+username+".")

            for x in range(0, (int(botamount))):  # + 10  this is not code
                joingame()
        spambots()
stampixel commented 2 years ago

Just use the google collab link i provided or smth, cuz that probably works well

stampixel commented 2 years ago

oh nvm i didnt see the discord bot part, basically, discord and the kahoot library im using probably has the same function/class called Client(). So when you call client, maybe the script thinks you are calling the discord.py client() and not the kahoot spammer one

KeparYTbcc commented 2 years ago

yup I realised this I fixed it, just import Ed as an other name and it works, sorry

oh nvm i didnt see the discord bot part, basically, discord and the kahoot library im using probably has the same function/class called Client(). So when you call client, maybe the script thinks you are calling the discord.py client() and not the kahoot spammer one

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstampixel%2FKahoot-Spammerl%2Fissues%2F5%23issuecomment-995424926&data=04%7C01%7C1583277%40cslaval.qc.ca%7C82fe1f275be14d67e47708d9c04aef06%7C2c37d513624b457e92ac72faaeb34cba%7C0%7C0%7C637752250381550412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yGrxiRranzFPgNXjIf1MGHPwBNkgM0F7m88ycH0xozU%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAQGYT6YE2WZO4QLIS7QEULTURFR4PANCNFSM5KFIIGRA&data=04%7C01%7C1583277%40cslaval.qc.ca%7C82fe1f275be14d67e47708d9c04aef06%7C2c37d513624b457e92ac72faaeb34cba%7C0%7C0%7C637752250381550412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FTu01b3q2XpT9B1D73YNzUZa4QZfvw3gX59GEPGnEUg%3D&reserved=0.