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

Overview

repo-finder-bot

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

forthebadge made-with-python

Add to your server

Add HexBot

FAQs

  • Hmm. What's this?

This is the Repo Finder Bot, a bot designed to help people find good GitHub repositories to contribute to.

  • How does it work?

Simple. Whenever you execute the rf.repo [topic] command in your server, the bot uses the GitHub API to find a good repository matching the topic and then send an array of details related to it.

  • What sort of details?

A whole array of details, including basic info ranging from the amount of stars and forks to the latest issues contributed to the repo.

Here's an example:

Screenshot

  • Why are there no slash commands?

There was a slight trouble trying to fetch data using slash commands but don't worry, slash commands will be added soon!

  • Why is the code so bad?

It works.

I'll fix it.

  • Cool bot, can I add it to my server?

Of course you can! Just click this link and select the server of your choice.

  • How can I contribute?

Just check out the Issues pane for potential issues and submit a PR to solve them. Of course, you can always submit regular PRs not linked to an issue and I'd be happy to accept them!

Icons made by Freepik from Flaticon.

Comments
  • Complete code restructure

    Complete code restructure

    Changelog for ba5ba59

    Previous commits pertain to previous PRs and should be reviewed first

    Major Cog changes:

    • Cogs featuring commands are now in cogs/src/commands
    • Cogs will now be dynamically loaded from above directory. No manual specification is needed anymore. Write a cog, place it in the directory, and it will automatically be loaded
    • Exception handling is in place. If a cog fails to load, it will be skipped gracefully
    • ~~TODO: better debug messages for exceptions. Often times, due to logging (?), cogs will pass their errors to a discord_error deployment. Is there a way to print the traceback here?~~ Implemented in e2f49cc
    • A template.py file exists in the directory now to aid in future command writing. This hosts requirements needed for a file to be loaded as a cog

    Special method changes:

    • Functions providing Github API utilities are now in separate modules (cogs/src/requester.py as search_requester)
    • This working directory gets injected to the sys.path for each cog. Import instructions are in the template.py

    Ultimately, this is a complete re-organization of code

    opened by V3ntus 9
  • TODO: Slash commands

    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

    opened by V3ntus 8
  • Command raised an exception: TypeError: argument of type 'NoneType' is not iterable

    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

    opened by mauvehed 5
  • Commands system improvements and rewrites

    Commands system improvements and rewrites

    a95d612 Rewrote repo.py to provide an easier experience writing future search request commands.

    • Moved embed processing and request query forming to separate functions
    • Wrote a custom GH API query formation system to account for added modular command writing: Send a payload of the user's queries to the search_requester function, returns raw response
    • Implemented some exception and error handling

    Ultimately, this prepares the cog for new commands

    cfdb46d Updated commands to support multi args

    • Added a command "rf.repolang" to search by language and (optional) topic
    • Updated "rf.repo" to support multiple topics
    • Minor improvements to "search_requester" function

    0a4f189 Fixed a bug where calling rf.repo with a single repo did not cast as a required list object in the payload

    opened by V3ntus 5
  • Migrate to python logging library

    Migrate to python logging library

    Restructures stdout messages to provide ease of use for debugging

    Resolves #11

    658d2f4

    • Added logutil and moved initial log config/processing there

    fc104ee

    • Moved chunk of code to init a logger into its own function in logutil.py
    opened by V3ntus 3
  • Async HTTP request support (aiohttp)

    Async HTTP request support (aiohttp)

    https://github.com/savioxavier/repo-finder-bot/pull/6/commits/b6effe83dc78c1d814971476832a31247eec9f7d :

    • Removed any lines where blocking code was present in HTTP requests and replaced with async code
    • search_requester now returns JSON objects natively. No need to append .json() to returned responses in commands from now on
    opened by V3ntus 3
  • feat!: migrate to interactions.py

    feat!: migrate to interactions.py

    This PR migrates the bot from discord.py (with discord-py-interactions) to interactions.py as a standalone library.

    This PR is a follow up to this pull request: #23 by @V3ntus. This PR will also close issue #24.

    Mega props to V3ntus for helping me out by creating a dev version of the interactions-py branch, and making this transition to another library much easier. This wouldn't have been possible, if not for you, so thanks!

    Stuff changed:

    • [BREAKING] migrate from discord.py (with discord-py-interactions) to interactions.py as a standalone library.
    • [BREAKING] Discard package discord-py-slash-command
    • [BREAKING] Remove regular, legacy message commands and use slash commands only
    • Fix a few issues with the commands
    • Improve a lot of the code
    • Update error messages to be more concise for a better user experience
    • Format code using black instead of autopep8
    • ...and a few more changes

    For more info, check the commits of this pull request

    opened by savioxavier 2
  • feat!: migrate to discord-py-interactions v4

    feat!: migrate to discord-py-interactions v4

    This branch is *unstable*

    Currently, bots may experience dropped websocket connection, throwing heartbeat errors. As of now, there is no reconnection logic implemented, but is being actively worked on

    @savioxavier let me know if you want to merge this to a different branch of yours or something. Merging unstable to main might be a bad idea

    Changelog

    • Upgrades to the new version of discord-py-interactions
    • ! Message commands are now deprecated. Slash commands are now being used explicitly
    • Implements a rewritten custom "cog" loader found here: V3ntus/discord-py-interactions_boilerplate#3
    • Rewrote cogs to fit the structure of this new "cog" loader and v4
    • Refactoring here and there
    opened by V3ntus 2
  • REF: Refined folder structure

    REF: Refined folder structure

    Needing testing. Short on time currently, but I was getting a 403 Missing Access on my Discord bot token, even though I thought I had my bot already setup for applications.commands scope.


    https://github.com/savioxavier/repo-finder-bot/pull/20/commits/fc2f14bc73490e5ef536feade88aff3058ec1e8a : Cleaned up the folder structure, cleaned up and readied module imports

    https://github.com/savioxavier/repo-finder-bot/pull/20/commits/956cc10732f22d4bf57b2a2473c46fb1b7f3f3cd : added documentation for granting permissions for slash commands

    opened by V3ntus 2
  • Migrate to interactions-py v4

    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.

    opened by savioxavier 1
  • REF: V3ntus/repo-finder-bot#9 Refactors cogs to call both types of command handlers

    REF: V3ntus/repo-finder-bot#9 Refactors cogs to call both types of command handlers

    As per commit https://github.com/savioxavier/repo-finder-bot/commit/8b0117dcc4470ca966e0ebc148ce81c3d7a8e6d3 :

    • https://github.com/V3ntus/repo-finder-bot/issues/9 = Removes redundancy that needed two instances of a cog script to be present. Now, both @commands.command and @cog_slash are called in the same script
    • Removed /slashcogs/ as it is no longer needed
    opened by V3ntus 1
  • Known issues and required features

    Known issues and required features

    Known issues and required features

    • [x] No slash commands, as of yet.
    • [x] Server-based command cooldown
    • [ ] Complex and bits of repetitive code - probably refactor code into smaller methods.
    • [x] Better finder commands - search by language, search by multiple topics etc.
    • [x] Improve async/await.
    • [x] Better exception handling.
    • [x] 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.

    opened by savioxavier 1
Owner
Skyascii
A very caffeine dependent life form
Skyascii
A Python script to backup all repos (public or private) of a user.

GithubBackupAllRepos A Python script to backup all repos (public or private) of a user. Features Clone public and private repos Load specified SSH key

Podalirius 15 Jan 3, 2023
DSAIL repos - DSAIL Repository Template

DSAIL Repository Template DSAIL @ KAIST . ├── configs ('--F', help='for configur

yunhak 2 Feb 14, 2022
Repo-cloner - Script takes user public liked repos and clone it to a local folder

Liked repos cloner Script takes user public liked repos and clone it to a local

Aleksei 2 Jun 18, 2022
A Python Client to View F1TV Content the right way

F1Hub is a terminal application running directly on your computer -- no connection to the website needed* *In theory. As of now, the F1TV website is needed for some content

kodos 3 Jun 14, 2022
The best (and now open source) Discord selfbot.

React Selfbot Yes, for real Why am I making this open source? Because can't stop calling my product a rat, tokenlogger and what else not. But there is

null 30 Nov 13, 2022
The best Discord bot, created for r/Jailbreak

Bloo Setup instructions These instructions assume you are on macOS or Linux. Windows users, good luck. With Docker (recommended!) You will need the fo

GIR 33 Dec 16, 2022
The Best Multipurpose Discord Bot!

Polsu The Best Multipurpose Discord Bot! • Introduction • Screenshots • Setup • License Introduction Polsu is a Multipurpose Discord Bot. Polsu has a

Polsulpicien 1 Nov 9, 2021
The best discord Nuk3r !

Discord - Nuker ☢️ Nuk3r ☢️ STEP 1 ✅ We go create discord bot ! [>] Go on https://discord.com/developers/applications [>] Set the name of your applica

2s.py 1 Apr 16, 2022
The best discord.py template with a changeable prefix

Discord.py Bot Template By noma4321#0035 With A Custom Prefix To Every Guild Function Features Has a custom prefix that is changeable for every guild

Noma4321 5 Nov 24, 2022
Upvotes and karma for Discord: Heart 💗 or Crush 💔 a comment to give points to an user, or Star ⭐ it to add it to the Best Of!

?? Reto Reto is a community-oriented Discord bot, featuring a karma system, a way to reward the best comments, leaderboards, and so much more! React t

Erik Bianco Vera 3 May 7, 2022
SC4.0 - BEST EXPERIENCE · HEX EDITOR · Discord Nuker · Plugin Adder · Cheat Engine

smilecreator4 This site is for people who want to hack or want to learn it! Furthermore, this program does not work without turning off Antivirus or W

null 1 Jan 4, 2022
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022
DeKrypt 24 Sep 21, 2022
A liblary whre you can find helpful functions for your discord bot

DBotUtils A liblary whre you can find helpful functions for your discord bot Easy setup Setup is easily and flexible. Change anytime. After setup just

Kondek286 1 Nov 2, 2021
Find rare users in discord servers

BadgeScraper Find rare users in discord servers How to use Replace the guild_id, server_id and token by the values you wanna use If you never used dis

null 20 Dec 9, 2022
Discord Token Finder - Find half of your target's token with just their ID.

Discord Token Finder - Find half of your target's token with just their ID.

Ttawi 2 Apr 7, 2022