Giter Site home page Giter Site logo

savioxavier / repo-finder-bot Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 9.0 137 KB

Find the best repos to contribute to, right from Discord!

Home Page: https://discord.com/oauth2/authorize?client_id=772682311346159616&permissions=2147871808&scope=bot%20applications.commands

License: GNU General Public License v3.0

Python 98.88% Dockerfile 1.05% Procfile 0.07%
bot discord discord-bot discord-py github-api hacktoberfest repository-finding

repo-finder-bot's Introduction

Hey, I'm Savio

I develop CLI tools, libraries and webapps. See my collection of repos for more.

cat github.ts
/* eslint-enable better-readme */
const self = (
  l: Language<'python' | 'go' | 'typescript' | 'javascript'>,
  f: Framework<'next' | 'react' | 'vue' | 'nuxt' | 'svelte'>,
  s: Shell<'zsh' | 'bash' | 'powershell'>,
  e: Editor<'vscode' | 'neovim' | 'pycharm'>
): GitHubProfile => gh.update('savioxavier', { l, f, s, e })
GET /stats

stats-card

GET /languages

languages-card

โ˜•

repo-finder-bot's People

Contributors

jack073 avatar mauvehed avatar savioxavier avatar v3ntus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

repo-finder-bot's Issues

TODO: Slash commands

What's the status on slash commands?

I've been attempting to implement discord-interactions, but normal commands are not surviving: bot does not respond to any rf. commands, returning "command not found" message in Discord.


main.py:

...
# Tested self_bot=True but removed due to it not responding to rf. at all
client = commands.Bot(command_prefix=determine_prefix,
                      case_insensitive=True,
                      activity=activity,
                      intents=intents,
                      help_command=None,
                      status=Status.idle
                      )
slash = SlashCommand(client, sync_commands=True, sync_on_cog_reload=True)

...

# Having both decorators active at the same time throws two different exceptions:
# When @client is loaded first, "TypeError: Callback must be a coroutine"
# When @slash is loaded first, "TypeError: command_help() got an unexpected keyword 'kwargs'" and a "kwargs" argument is required while executing /help

@slash.slash(name="help", description="List commands", guild_ids=__GUILD_ID__)
# @client.command(name="help", description="List commands")
async def command_help(ctx: SlashContext):
    "Main help command for the bot"
    logger.debug(f"{ctx.author} - initiated help command")
...

The above code will respond to /help, but not rf.help

There was one instance where the bot would respond to both methods, but I cannot reproduce it. I believe it stopped after adding cog slash commands

Command raised an exception: TypeError: argument of type 'NoneType' is not iterable

So far this has only happened with my local instance of repo-finder-bot, specifically the one running from the Dockerfile I submitted in #15. Has anyone else seen this? You search for a repo and it throws an error from discord.py, you run the exact same search again and it succeeds. I've seen this a couple times so far but I've failed to catch the debug output from the container.

I'll try and post that here next time I see it.

image

Known issues and required features

Known issues and required features

  • No slash commands, as of yet.
  • Server-based command cooldown
  • Complex and bits of repetitive code - probably refactor code into smaller methods.
  • Better finder commands - search by language, search by multiple topics etc.
  • Improve async/await.
  • Better exception handling.
  • Use aiohttp as opposed to requests for web requests (see this for further details)
  • Migrate to interactions.py
  • A few bugs. A lot of bugs.

If you do know how to fix these issues, please submit a PR, that would be much appreciated.

Migrate to interactions-py v4

Repo Finder Bot needs to be migrated from discord-py-interactions v3 to v4 as v3 of discord-py-interactions has reached EOL and the API on which discord-py is based on will soon be decommissioned. As such, the bot needs to be upgraded to a better standalone library (in this case, interactions-py). Although discord-py has resumed development (after a long absence) a few days ago, I won't be switching to it.

Gonna be a bunch of changes, but it shouldn't be too hard as V3ntus has helped fix most them on an unstable branch interactions-v4-unstable.

Assigning this issue to myself because I've already started the work, just needs a few more fixes.

Update: This might get delayed to the end of March due to some unforeseen circumstances.

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.