Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Tutorial doesn't work #174

Open
actualdankcoder opened this issue Mar 7, 2020 · 3 comments
Open

Tutorial doesn't work #174

actualdankcoder opened this issue Mar 7, 2020 · 3 comments

Comments

@actualdankcoder
Copy link

I followed up with the tutorial, and everything functioned fine until I tried to test the command and nothing showed up in the console except for the basic connection info. I tried to check the issue by increasing the log level but it turns out that log level is broken as well:
AttributeError: module 'logging' has no attribute '1'

@b1naryth1ef
Copy link
Owner

You have provided no useful information to debug this issue with, such as:

  • what was the logging output ("nothing showed up in the console except for the basic connection info" isn't helpful, posting the console output would be much more useful)
  • what part of the tutorial are you attempting
  • what's the message you type look like
  • what's your plugin file look like
  • what does your configuration file look like

For your logging issue it looks like your trying to set the log level to an integral value, which makes no sense, did you find that somewhere in the docs?

In the future please try to elaborate on the issue your having and provide all the information that could help someone reproduce or narrow down the problem your having.

@actualdankcoder
Copy link
Author

actualdankcoder commented Mar 8, 2020

Console Output(basic information about the connection to the WebSocket)

[INFO] 2020-03-08 21:18:59,187 - Bot:485 - Adding plugin module at path "plugins.bot"
[INFO] 2020-03-08 21:18:59,190 - HTTPClient:271 - GET https://discordapp.com/api/v7/gateway (None)
[INFO] 2020-03-08 21:18:59,393 - GatewayClient:147 - Opening websocket connection to URL `wss://gateway.discord.gg?v=6&encoding=json&compress=zlib-stream`
[INFO] 2020-03-08 21:19:00,371 - GatewayClient:212 - WS Opened: sending identify payload
[INFO] 2020-03-08 21:19:00,371 - GatewayClient:122 - Received HELLO, starting heartbeater...
[INFO] 2020-03-08 21:19:00,901 - GatewayClient:126 - Received READY

Part of the tutorial I am attempting:

https://github.com/b1naryth1ef/disco/blob/master/docs/bot_tutorial/first_steps.md

My plugin file(same as in the tutorial but named bot.py)

from disco.bot import Plugin


class TutorialPlugin(Plugin):
    @Plugin.command('ping')
    def command_ping(self, event):
        event.msg.reply('Pong!')

My config file:

{
  "token": "ACTUAL_TOKEN",
  "bot": {
    "plugins": [
      "plugins.bot"
    ]
  }
}

The command used for executing the bot:

python3 -m disco.cli --config config.json

OS: Ubuntu 18.04

I tested it by pinging the bot with the message ping

@actualdankcoder
Copy link
Author

Regarding the log level: It was my mistake that I thought that the log 'level' was supposed to be integral

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