Git Product home page Git Product logo

npc-cogs's Introduction

Npc-Cogs V3

Red-DiscordBot Discord.py Code Style: Black

A fun oriented list of Red-Cogs made for fun and stonks. Discord User: epic guy#0715 Docs: https://npc-cogs.readthedocs.io/en/latest

Installation

To add cogs from this repo to your instance, do these steps:

  • [p]repo add npc-cogs https://github.com/npc203/npc-cogs
  • [p]cog install npc-cogs <cog name>
  • [p]load <cog name>

About Cogs

Cog Status Description
Bible Alpha
Get bible verses or get references for wordsPowered by biblegateway, this cog can get bible verses and also can reverse search by getting the references for the searched word
CustomHelp Alpha
A category themed custom helpKindly read https://npc-cogs.readthedocs.io/en/latest/customhelp.html on how to setup
Google Alpha
A google search cog with tons of functionsThis cog scrapes google to get results/reverse image search, cards, books, images, etc.. (siu3334 did a lotta work in this cog as well)
NoReplyPing Beta
Notifies in dms if a person replies to you but turned their ping off Made for the servers with extra modesty who turn their pings off and you miss their message
Speak Alpha
Speak as others or for yourselfThis uses webhooks to mimic the person's identity and speak what you type, it also can speak stuff for you (insults and sadme)
Todo Alpha
A todo cogA simple todo cog to remember your tasks
TypeRacer Alpha
Typing speed testTest your typing skills with this cog
Weeb Alpha
Bunch of Otaku emoticonsExpwess youw weebness using the bunch of wandom weeb emoticons UwU
Snipe Alpha
Multi Snipe for fun and non-profitBulk sniping to stab back those anti-sniping smart ass users
Snake Beta
A simple Snake GameThis is a classical snake game, uses dpy menus. Be fully aware of this cog spamming the channel ratelimit buckets

Credits

  • Everyone who tested my cogs and helped me with the code. <3
  • Everyone who contributed to make this better.
  • Thank you Red community, you guys are awesome.

Contributing

  • Haven't set up pre-commit hooks yet, so if you want to contribute, please do it yourself.
  • Kindly follow the format of black with line-length = 99 and isort
  • This can be done by pip install -U black isort
  • Then run the below commands to auto format your code
black .
isort .

npc-cogs's People

Contributors

aaa3a-aaa3a avatar deihim007 avatar hollowstrawberry avatar honkertonken avatar jackenmen avatar japandotorg avatar kreusada avatar kuro-rui avatar lgtm-com[bot] avatar ltzmax avatar npc203 avatar oofchair avatar owocado avatar phenom4n4n avatar qenu avatar ryan5453 avatar sourcery-ai[bot] avatar sravan1946 avatar stuckinatimezone avatar twindragon avatar ultralegendary avatar zephyrkul 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

Watchers

 avatar  avatar  avatar  avatar  avatar

npc-cogs's Issues

[Feature Request] Category view permissions based on roles

Hi!

A cool extra feature would be if we could hide categories from different roles. For example if I have a Mod category then I can add permissions to Moderator role to see that category, but the normal member of the discord server does not see it.

FYI: Permissions cog does not help with this. User can not see any commands under the category, but he can see the category itself.

Thank you!

[Feature Request] More modularity to snipe

Add the ability to ignore specific users/users with certain roles or users with certain perms.
I apologize if this is already a thing but I could only find an option to ignore channels

[Feature Request] Override a command category in customhelp

Right now we can assign Cogs to our own custom categories, but I think it'd be cool if we could assign specific commands to their own categories too. As an example, [p]userinfo is in the Mod cog while I'd like it to show up under my Informational category. I think it'd be pretty neat if we could override commands like this, but I'm not sure how feasible it'd be. Thanks!

error in command [p]google

  • command ran:
    [p]google helo
[ERROR] red: Exception in command 'google'
Traceback (most recent call last):
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/aravind/Library/Application Support/Red-DiscordBot/data/netav/cogs/CogManager/cogs/google/google.py", line 92, in google
    await ResultMenu(source=Source(pages, per_page=1)).start(ctx)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 948, in start
    await super().start(ctx, channel=channel, wait=wait)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 688, in start
    self.message = msg = await self.send_initial_message(ctx, channel)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 944, in send_initial_message
    return await channel.send(**kwargs)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/abc.py", line 890, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/http.py", line 156, in request
    kwargs['data'] = utils.to_json(kwargs.pop('json'))
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/utils.py", line 318, in to_json
    return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type URL is not JSON serializable

[p]google image latest waifus

[ERROR] red: Exception in command 'google image'
Traceback (most recent call last):
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/aravind/Library/Application Support/Red-DiscordBot/data/netav/cogs/CogManager/cogs/google/google.py", line 304, in image
    await ResultMenu(source=ImgSource(response, per_page=1)).start(ctx)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 948, in start
    await super().start(ctx, channel=channel, wait=wait)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 688, in start
    self.message = msg = await self.send_initial_message(ctx, channel)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/redbot/vendored/discord/ext/menus/__init__.py", line 944, in send_initial_message
    return await channel.send(**kwargs)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/abc.py", line 890, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/http.py", line 156, in request
    kwargs['data'] = utils.to_json(kwargs.pop('json'))
  File "/Users/aravind/opt/anaconda3/lib/python3.9/site-packages/discord/utils.py", line 318, in to_json
    return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/__init__.py", line 234, in dumps
    return cls(
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/aravind/opt/anaconda3/lib/python3.9/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type URL is not JSON serializable

other commands seems to work well

use buttons

In help embed, if we enable the button then it should remove other buttons when adding left and right arrow buttons.

For e.g if I type !help it sends a help message with a button once I choose general for example it adds arrows but does not remove the previous buttons.

[Feature Request] Custom Help hide absent cog names

Ability to refresh everything. Currently, when you unload a cog, it still stays on the help menu on the main bit. This would also remove those cogs that are not loaded from the help menu making it look less crowded and will no longer show cogs that are unloaded.
image
image

[Issue] CustomHelp on dpy2

When attempting to set a category up with chelp edit, this happens:

mapping values are not allowed here
  in "<unicode string>", line 2, column 7:
    - desc: Fun commands
          ^

This is on the dpy2 branch.
Thanks!

Fix yandex 400 error

Seems they changed something that broke things. probably url change for querying

[BUG] Embed logic will show more than 25 fields.

Chelp is showing more than 25 fields in a embed causing it to crash help commands.
This is on dpy2 branch

https://cdn.discordapp.com/attachments/914905365701853214/1191579684018860122/Screenshot_2024-01-02-00-12-01-801_com.discord.jpg?ex=65af2e8f&is=659cb98f&hm=1342d3005b45b17af9747dcc866c08de3a956862ab47889c91527cbba0a0157d&

https://cdn.discordapp.com/attachments/914905365701853214/1191589253898055750/image.png?ex=65af3778&is=659cc278&hm=e7df05dda4ae5c417cb6be2e54733f88d3c02738cda2358c3d2e210ffd311095&

[2023-12-30 03:25:20] [ERROR] red: Exception in command 'help'
Traceback (most recent call last):
  File "/home/glas/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glas/redenv/lib/python3.11/site-packages/redbot/core/commands/help.py", line 925, in red_help
    await ctx.bot.send_help_for(ctx, thing_to_get_help_for, from_help_command=True)
  File "/home/glas/redenv/lib/python3.11/site-packages/redbot/core/bot.py", line 1288, in send_help_for
    return await self._help_formatter.send_help(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/customhelp/core/base_help.py", line 166, in send_help
    await self.format_category_help(ctx, help_for, help_settings=help_settings)
  File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/customhelp/themes/danny.py", line 86, in format_category_help
    await self.send_pages(
  File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/customhelp/core/base_help.py", line 498, in send_pages
    await menu.start(ctx)
  File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/customhelp/core/base_help.py", line 577, in start
    await self.menus[1].start(ctx)
  File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/customhelp/core/views.py", line 124, in start
    self.message = await ctx.send(
                   ^^^^^^^^^^^^^^^
  File "/home/glas/redenv/lib/python3.11/site-packages/redbot/core/commands/context.py", line 91, in send
    return await super().send(content=content, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glas/redenv/lib/python3.11/site-packages/discord/ext/commands/context.py", line 1024, in send
    return await super().send(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/glas/redenv/lib/python3.11/site-packages/discord/abc.py", line 1561, in send
    data = await state.http.send_message(channel.id, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glas/redenv/lib/python3.11/site-packages/discord/http.py", line 745, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields: Must be 25 or fewer in length.```

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.