Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

YO #5

Open
KeparYTbcc opened this issue Dec 16, 2021 · 4 comments
Open

YO #5

KeparYTbcc opened this issue Dec 16, 2021 · 4 comments

Comments

@KeparYTbcc
Copy link

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
Copy link
Author

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
Copy link
Owner

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

@stampixel
Copy link
Owner

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
Copy link
Author

KeparYTbcc commented Dec 16, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants