Giter Club home page Giter Club logo

discord-bot's People

Contributors

deepsourcebot avatar jackjt8 avatar lemaik avatar thatredox avatar

Stargazers

 avatar

Watchers

 avatar  avatar

discord-bot's Issues

Check About Me and User Status for phishing / scam links

image

While in the above example a discord link is used, it would be possible to use known phishing / scam links and bypass the Bot by placing them in the About Me or User Status section. If the API allows it, whenever someone makes a comment, we should check the About Me and User Status section.

Error with messages with multiple GH links.

#1 #2

Spits out

INFO:bot:Message <number> with 2 GitHub issues.
Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/app/main.py", line 155, in on_message
    utils.generate_gh_embed_snippet(embed, issue, self._gh)
  File "/app/utils.py", line 120, in generate_gh_embed_snippet
    repo = gh.get_repo(f"{issue[0]}/{issue[1]}")
UnboundLocalError: local variable 'issue' referenced before assignment

Check `content-type` header to filter images.

Images from Twitter such as: https://pbs.twimg.com/media/FUVK3slWYAMEU0e?format=jpg do not end in .jpg. However, the response contains the content type header: content-type: image/jpeg.

`/gh` command is broken.

ERROR:discord_slash:An exception has occurred while executing command `gh`:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord_slash/client.py", line 1353, in invoke_command
    await func.invoke(ctx, **args)
  File "/usr/local/lib/python3.10/site-packages/discord_slash/model.py", line 210, in invoke
    return await self.func(*args, **kwargs)
  File "/app/main.py", line 280, in gh
    embed = utils.generate_gh_embed(number, self._repo)
  File "/app/utils.py", line 86, in generate_gh_embed
    repo = gh.get_repo(f"{issue[0]}/{issue[1]}")
AttributeError: 'Repository' object has no attribute 'get_repo'

Bot tries to delete thread creation messages for not having an image.

INFO:bot:Removing message 961499721086681101 in 549680988989423631 for not having an image: Caustics
Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/app/main.py", line 55, in on_message
    warning = await message.reply(
  File "/usr/local/lib/python3.10/site-packages/discord/message.py", line 1358, in reply
    return await self.channel.send(content, reference=self, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/discord_slash/dpy_overrides.py", line 323, in send_override
    return await send(channel, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/discord_slash/dpy_overrides.py", line 300, in send
    data = await state.http.send_message(
  File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 254, in request
    raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In message_reference: Cannot reply to a system message

https://discord.com/channels/541221265512464394/549680988989423631/961359324750426244

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.