Giter Club home page Giter Club logo

Comments (4)

Laogeodritt avatar Laogeodritt commented on May 29, 2024

@cxcfme Can you get me logs for this event, in the description? 2018-02-24 at 02:03 UTC

from kaztron.

cxcfme avatar cxcfme commented on May 29, 2024

@Laogeodritt

`[2018-02-24 02:03:59,280] (ERROR) kaztron.cog.core: While executing [2018-02-24 02:03:58] <#bot_test:AntimatterNuke#7807> '.spotlight join'

Discord API error FORBIDDEN (status code: 403): Cannot send messages to this user

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/home/kaztron/KazTron/kaztron/cog/spotlight.py", line 388, in join
await self.bot.send_message(ctx.message.author, self.msg_join)
File "/usr/local/lib/python3.5/dist-packages/discord/client.py", line 1152, in send_message
data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts, embed=embed)
File "/usr/local/lib/python3.5/dist-packages/discord/http.py", line 196, in request
raise Forbidden(r, data)
discord.errors.Forbidden: FORBIDDEN (status code: 403): Cannot send messages to this user
[in /home/kaztron/KazTron/kaztron/cog/core.py:112]`

from kaztron.

Laogeodritt avatar Laogeodritt commented on May 29, 2024

Deferred to v2.1 - PM limited users should be a limited case, this fix can be applied to the role_man feature that is absorbing spotlight join/part

To evaluate: Effect of this bug on usability, whether it is possible to simply improve the error message in the general case ("An error occurred" → "Can't send PM, make sure you (or the recipient) has PMs enabled")

Unsure if generic solution possible (also to catch the error in the case of help files, core's "don't know this command", etc.) - given that it only gives a discord.Forbidden error for the error handler

from kaztron.

Laogeodritt avatar Laogeodritt commented on May 29, 2024

Moved to v2.2 milestone

detect inability to pm a user and respond in a channel command context (+ maybe a #meta channel if configured?)

implement as a wrapper?

from kaztron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.