GithubHelp home page GithubHelp logo

vertyco / vrt-cogs Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 28.0 113.64 MB

Utility cogs for Red by Vertyco

License: Other

Python 99.84% HTML 0.16%
minecraft xbox xbox-one steam games server-manager discord mod utility

vrt-cogs's Introduction

Arkwork

Various useful and fun cogs for Red V3.

Py black license

Red-DiscordBot GitHub repo size

I'm a full time software developer that hosts Ark servers as a hobby. I enjoy working with APIs and making tools that are useful to myself and others. Check out some of my projects below!

Cog Description
Assistant
Get your own AI assistant in Discord Automate your server with OpenAI's ChatGPT language model (or self-host your own!). Configure a prompt with condensed information about your server, along with other options to make answering questions easier. Setup embeddings to optimize token usage, and even write custom functions to extend the functionality of what the assistant can do!
AutoDocs
Document your cogs with ease! Easily generate documentation for any cog in Markdown format.
BankBackup
Backup and restore bank balances for all members in a server. Backup/Restore for server bank balances.
BankEvents
Bank transaction listener events for 3rd party cogs. Dispatches events when different bank transactions occur, such as when a user deposits credits, withdraws credits, or transfers credits.
EconomyTrack
Track your economy's total balance and member count over time. Visualize the total market cap of your Red economy. Note: Having bank set to local on a public bot will cause much heavier I/O load than using a global bank.
Cartographer
Discord Server Backup/Restore Create backups of your Discord server and restore them easily.
Crafter
Get crafting information for items in Ark View detailed breakdowns of all ingredients needed to craft items from the game Ark Survival Evolved.
BankDecay
Inactivity-based economy credit decay with customizable settings Introduces an economy decay system to Discord servers, automatically reducing inactive users' currency to stimulate engagement. Admins can customize and oversee decay settings, fostering active participation within the community.
EmojiTracker
Simple emoji tracker with leaderboards. Track reactions in your server and get leaderboards for emojis that are most used, or users that have reacted the most.
Events
Host events in your Discord. Create and manage events easily with a variety of entry types and requirements. Event submissions will be posted and counted with a winner or winners announced automatically when the event is complete.
Fluent
Easy to use translation tools. Translate messages or set a channel and both languages, if a message is in language 1 it gets converted to language 2 and vice versa using googles free api.
Gmail
Send emails from your Gmail account. Easily send emails with customizable signatures and allowed roles.
GuildLock
Manage what kind of servers the bot can join. Manage what kind of servers the bot can join. A stripped down rewrite of Phen's Baron cog.
GuildLog
Set a channel to log guilds the bot leaves/joins. Configure a join/leave message of your choice and whether you want to use embeds or not, the bot will log when it joins or leaves a guild. All guilds can use this cog to see what servers the bot is joining(Guild Name/Bot Name/Total Servers)
Hunting
Hunt birds in your server! Originally created by Paddo for red v2, then ported to v3 by aikaterna#1393, and now maintained by me. This cog allows you to 'hunt' birds in your server via reactions or text.
IdeaBoard
Make suggestions and share ideas anonymously. Allow users to create suggestions for your server. With optional anonymity and customization.
LevelUp
Streamlined Discord Leveling System. An intuitive full-featured leveling system with prestige features, customizable backgrounds, toggleable embed/image profiles, and extensive voice tracking options.
Meow
Meow Replaces the word "now" with "meow" in someone's latest message, if word doesnt exist in the most recent 2 messages, it sends a random cat unicode emoji. Yall have a good day meow.
NoBot
Filter certain messages from other bots. (ONLY checks messages from other bots), Add a bot to be filtered and a key phrase to check for. When that bot sends a message containing that phrase the message will be auto-deleted.
NoNuke
A very straightforward Anti-Nuke cog. Set a cooldown and overload count(X events in X seconds), if any user with perms exceeds them, you can set an action to be taken and logged. Events include Kicks/Bans, Channel Creation/Edit/Deletion, Role Creation/Edit/Deletion. Events are not counted separately so any action taken in any order applies to the cooldown bucket.
Pixl
Guess pictures with friends and earn points. Start a game to have a mostly blank image pop up. Every few seconds a few blocks will show up and the goal is to guess what it is before the image is completed or time runs out. You are also competing with everyone else in the channel the game is running in!
Profiler
Cog profiling tools for bot owners and developers! Cog profiling tools for bot owners and developers. Attach profilers to cogs and get runtime metrics for their commands and methods.
Pupper
Pet the doggo! Originally created by aikaterna#1393, now maintained by me. This cog has pet that comes around on an on_message listener and waits for someone to pet it (react with a standard wave emoji), and rewards with credits. Many attributes are configurable.
SETools
Space Engineers Server Manager! Manage your Space Engineers server remotely with various useful commands.
Tickets
Customizable Multi-Panel support ticket system. 'Tickets' is an easy to use, fully customizable multi-panel ticketing system with a variety of options and features including modals, logging, transcripts, multi-button panels and more!
UpgradeChat
API Integration for the Upgrade.Chat API. Allows you to add your api key and products to the bot and set a dollar to credit conversion ratio. When a user makes a purchase, they can claim it in your Discord to receive economy credits.
VrtUtils
Random utility commands. Small collection of commands used for my personal bot.
XTools
Access your xbox profile and much more. Various tools for Xbox using Microsoft's XSAPI. View your Xbox profile, friends, screenshots and game clips using simple commands and interactive menus. (You will need to register a Microsoft Azure application to use this cog. Type "[p]apiset help" after install for more info)

ko-fi

Installation

Run the following commands with your Red instance, replacing [p] with your prefix:

If you haven't loaded the Downloader cog already, go ahead and do that first with: [p]load downloader. Then,

[p]repo add vrt-cogs https://github.com/vertyco/vrt-cogs
[p]cog install vrt-cogs <list of cogs>
[p]load <list of cogs>

Credits

  • Obi-Wan3 for holding my hand through a lot of my issues and questions I've had in the very beginning while learning python, and providing me with tips for finding things by myself.
  • All the Red staff members for being so damn helpful and having valuable insight.
  • The Red discord coding channel for having lots of helpful cog creators!

Contact

For help with my cogs, feel free to reach out in my support channel #support_vrt-cogs in the Red Cog Support server.

Contributing

If you have any suggestions, or found any bugs, please ping me in Discord (#117) or open an issue on my repo!

If you would like to contribute, please talk to me on Discord first about your ideas before opening a PR.

Translate my cogs

If you are interested in contributing to translations for my cogs, Click Here!

Feature Requests

I am open to ideas or suggestions for new cogs and features!

Star History Chart

Forks Stars Visitors Visitors

vrt-cogs's People

Contributors

aaa3a-aaa3a avatar agoble117 avatar djtomato avatar doctordinosaur avatar eternalllzm avatar japandotorg avatar jmesfo0 avatar karlsbjorn avatar lifeismana avatar sravan1946 avatar vertyco 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

Watchers

 avatar  avatar  avatar  avatar

vrt-cogs's Issues

fluent cog issues

Hey, I'm testing your fluent cog. When a channel is renamed, it will be shown in [p]fluent view, but if you try to remove it, the Bot responds that the channel isn't a fluent channel.
I tried what happens when I delete the channel. When I do the view command now I get an error:

Traceback (most recent call last):
File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/root/.local/share/Red-DiscordBot/data/lady_red/cogs/CogManager/cogs/fluent/fluent.py", line 95, in _view
name=discordchannel.name,
AttributeError: 'NoneType' object has no attribute 'name'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/root/redenv/lib/python3.8/site-packages/redbot/core/commands/commands.py", line 832, in invoke
await super().invoke(ctx)
File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1348, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/root/redenv/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'

[Tickets] Pin ticket answers/reason on open

Is your feature request related to a problem? Please describe.
Just QOL. Longer tickets can sometimes be a hassle figuring out what the original opening reason was for. Lots of scrolling to the top.

Describe the solution you'd like
tickets cog. When a ticket is opened, pin the embed containing answers to modals.

Describe alternatives you've considered
Forcing a poor mod to do it every time

Additional context
Nope - thanks

Prune invalid tickets function bug

Is your feature request related to a problem? Please describe.
Prune invalid tickets function has a bug. When the max number of tickets is set to one and only one user open a ticket and the channel is deleted mannualy. When is called this function the entry in the database stays and the user cannot open more tickets (because max is set to one). There is no problem if there is at least one valid ticket which belongs to another user. When there is one valid and one invalid ticket and the function is called there is no problem.

Describe the solution you'd like
To fix this issue you have to remove one line of code in tickets/utils.py
Line 281: if valid_user_tickets: has to be removed
image

This fix the error and we don't need this if statement beacause we have valid_user_tickets = {} and it is filled if there is any valid ticket for the user. If there is no valid tickets it will set valid_opened_tickets[user_id] = {} because the initial value of valid_user_tickets is {}!

Sincerely,
Creator X

Tickets Embeds

Describe the bug
Ticket embeds are not respecting the bots embed color

To Reproduce
Change the bot embed color and look at the embeds sent by tickets.

Expected behavior
Respect the bots embed color

[Support Cog] [Feature Request] multiple tickets please?

I would love to have multiple tickets, your cog is so good but only allows for one ticket panel. I have to use aaa3a's tickettool which is extremely bad compared to your cog. I prefer your cog so much, I even tried to close it and replace every instance of support with ticket just so I could have 2 copies.

[Feature Request] [Tickets] Timed ticket closes

A command for setting a timer on closure/no response would be beneficial. Sometimes you provide a solution to a member and they carry it out without updating the ticket. This increases overhead and the responsibility of ensuring the ticket is ok to close on the support staff.

This change proposes a command that notifies within the ticket a solution has been proposed/assumed completed and the ticket will close in X amount of time unless they respond explaining what the issue still being experienced is. If the user responds, it will abort the closure.

Similarly related, I was wondering if there was any way to view commands available within the thread such as [p]close. There doesn't seem to be a clear way to do this.

Ability to customize level up message

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
It would be awesome to be able to customize the message sent (either in DM or in the channel) when a user levels up, to add the role name in the message, or just change it in general.

Describe alternatives you've considered
I've considered manually changing the text in the code but I'd rather avoid making changes like that directly.

Additional context
N/A

[Feature Request] [LevelUp] How about MEE6, ProBot-style non-embed LevelUp notification?

Is your feature request related to a problem? Please describe.
The current embed notification doesn't seem to translate cleanly for languages like Korean and Japanese due to differences in word order.
For example, the expression "ocformula Just reached level 170 !" should be reworded to "ocformula 님, 방금 170 레벨에 도달했습니다!" when translated into Korean.

Describe the solution you'd like

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

[Hunting] Bot doesn't respond to Bang

Describe the bug
bot doesn't respond to bang

Screenshots
bang

bang2
bang3

Additional context
I've also reloaded the cog, doesn't help. I've checked with hunting next and it seems to correctly show when the new animal should appear.

Hunting version 3.2.11.
Ubuntu 22.04.1 LTS

[Levelup] Prestige Bug / Default no notifications request

Describe the bug
I wanted to prestige the Oldies on my Server, since the Malarne Import seemed to have failed, even after telling me 10 profiles have been imported

And after installing the cog, I got the first puzzled reactions since it is auto active everywhere. Every of the 31 Servers the Bot is supporting :D
Would be nice if the Levelup Notification is default off.

To Reproduce
[p]lvlset prestige

Expected behavior
Well yes, prestige level gets set

Screenshots

image

Additional context

none

[LevelUp] Experience Decay

Is your feature request related to a problem? Please describe.
Not really a problem. However, some people become inactive within the server and if your server is setup to allow privileged permissions after certain levels, leaving accounts dormant at high levels is sort of risky. If they get hacked and you allowed exceptions through automod or similar, it can wreak havoc.

Describe the solution you'd like
A configurable experience decay. This could be either a flat rate or a range. There could also be role exclusions from this decay. This means that every 24 hours or so, a user would lose say 10xp.

Describe alternatives you've considered
N/A

Additional context
This might not be possible, considering autoremove would have to be enabled in order for them to lose their highest role if it "collects" the roles. Otherwise, this is practically useless and suggestion is null as the original "problem" is not solved.

Feature: Send more than 1 message(embed) in new tickets separatelly

@vertyco hello sir vertyco, sorry for ping you, but can you help me add an footer and header to you support cog in the open ticket message please? and if is it possible to send 2 messages, cause when i set the ticket message he only sends 1, and i want to send 2 separetelly messages, thanks and sorry for bother you

Thanks and have a great day!
Screenshot_5

[pixl] `ValueError` on pixlset image viewglobal cmd

Describe the bug
Command raised an exception: ValueError: item would not fit at row 1 (6 > 5 width)

To Reproduce
Steps to reproduce the behavior:

  1. .pixlset image viewglobal
  2. See the error

Expected behavior
Should show the global images that have been added to the bot

Additional context

Traceback

Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/pixl/pixl.py", line 474, in view_global_images
    await self.image_menu(ctx, images, "Global Images")
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/pixl/pixl.py", line 743, in image_menu
    await menu(ctx, embeds, con, message=message, page=page)
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/pixl/menu.py", line 216, in menu
    m = MenuView(ctx, pages, controls, message, page, timeout)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/data/starship_main/cogs/CogManager/cogs/pixl/menu.py", line 115, in __init__
    self.add_item(MenuButton(emoji, style))
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ui/view.py", line 326, in add_item
    self.__weights.add_item(item)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ui/view.py", line 112, in add_item
    raise ValueError(f'item would not fit at row {item.row} ({total} > 5 width)')
ValueError: item would not fit at row 1 (6 > 5 width)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 783, in invoke
    await super().invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1642, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 783, in invoke
    await super().invoke(ctx)
      File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1642, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1023, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 238, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ValueError: item would not fit at row 1 (6 > 5 width)

[Feature Request] [LevelUp] Prestige XP conversion

Right now, if you prestige while being over the allowed prestige level. It will set you to prestige 1 level 1 zero experience. This feature request suggests that if you prestige while being over the minimum required level, all the extra experience past X level will be put towards your post-prestige level. This could be a toggle as well to preserve behavior others might prefer in this scenario.

Example: Level 40 is prestige requirement while member is level 43. All experience past level 40 would mean the user would most likely be Prestige 1 Level 12 after prestiging.

[Tickets] Cancel does not cancel message creation

Describe the bug
Typing cancel during the title addition section of addmessage does not cancel message creation

To Reproduce
Steps to reproduce the behavior:

  1. tset addmessage
  2. Select "Yes" for adding a title
  3. Type cancel and the embed creation will continue without cancelling

Expected behavior
The creation cancels

Screenshots
image

Additional context
You can cancel it by saying "cancel" post title message, but for consistency it should cancel at any point you say cancel.

[Feature Request] [Tickets] Save Modal Content in Transcript

Request: Store the modal message/responses in the ticket log.

When creating a modal, useful information that would originally be placed into the ticket transcript could potentially be lost without it.

Useful for auditing purposes and reference if transcripts are enabled.

[Feature Request] [Tickets] Multiple panels on single message

It would be very useful if we could utilize a single message to host multiple different ticket panels/buttons that behave different.

This would allow members to select what type of ticket they are opening so it can be directed to the correct category/team for remediation immediately. Thank you for considering.

[Tickets] Bot restart requires reload

Describe the bug
For some reason after starting the bot or a restart of it, the tickets cog "drops" the buttons leading to "This interaction failed" error message until the cog is reloaded.

To Reproduce
Steps to reproduce the behavior:

  1. Restart bot
  2. Ticket buttons will not work
  3. Reload tickets cog
  4. Buttons are fixed

Expected behavior
The cog should load and acknowledge ticket buttons without requiring a reload.

Screenshots
N/A

Additional context
Unfortunately I do not see any errors or logs. Our group has created a scheduled task to reload the cog every so often to prevent this.

Assistant matplotlib

Describe the bug

Exception during loading of package
Traceback (most recent call last):
  File "/data/venv/lib/python3.9/site-packages/redbot/core/core_commands.py", line 188, in _load
    await bot.load_extension(spec)
  File "/data/venv/lib/python3.9/site-packages/redbot/core/bot.py", line 1680, in load_extension
    lib = spec.loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/data/cogs/CogManager/cogs/assistant/__init__.py", line 6, in <module>
    from .assistant import Assistant
  File "/data/cogs/CogManager/cogs/assistant/assistant.py", line 7, in <module>
    from .abc import CompositeMetaClass
  File "/data/cogs/CogManager/cogs/assistant/abc.py", line 7, in <module>
    from .models import DB, Conversations, GuildSettings
  File "/data/cogs/CogManager/cogs/assistant/models.py", line 6, in <module>
    from openai.embeddings_utils import cosine_similarity
  File "/data/cogs/Downloader/lib/openai/embeddings_utils.py", line 4, in <module>
    import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'

To Reproduce
Steps to reproduce the behavior:

  1. Update to latest
  2. Try to reload.

Expected behavior
Loads cog

[Feature Request] [Support] Timed closes

Would be sweet to have a command or addition to sclose where the ticket would be automatically closed after a set amount of time such as 1h, 1d, etc.

Useful in resolution of incidents where the ticket creator fails to keep up with the ticket.

Example: !sclose 1h

[Support] Feature Request

DM Transcripts

Support Cog

As of right now, the cog can log the conversations from the ticket channel as a transcript to a certain channel, which is great. And works just fine.

A request would be to have another subcommand, to DM the owner/who opened the ticket, with the transcripts in the form of a TXT file after closing the ticket.

  • That makes a lot of sense since after closing the ticket, the ticket-owner loses the access to the channel.
  • It'd also make everything transparent, in the sense of, no would be able to tamper with the channel content(s) (deny or edit/add/remove any comments) afterwards from the ticket channel which itself is meant to be a temporary channel.
  • A toggle option would be great, and having an extra option to customize it would be even better.

Thank you

[Feature Request][LevelUp] Command to reset XP and Stars only

I want to reset XP at years end and I see that guildreset resets the cog entirely in the guild forcing me to reset all other settings.
levelset admin guildxpreset/globalxpreset

This would save all admin and user based settings and only reset XP points/level and stars

[Feature Request] Cog: Support

I use support for verifying members in my server and mod related things, this usually requires uploading a id for verifying age and screenshots for mod stuff. Therefore it would be nice if support gave the ticket creator attach_files permissions. The ticket category has @everyone with those permissions but the ticket channels don't inherit them. I have implemented a patch on my bot but I do think that those permissions are kind of important for anyone using the tickets for these tasks.

[LevelUp] Custom Leveling Algorithms

Is your feature request related to a problem? Please describe.
Currently, LevelUp doesn't support custom leveling algorithms like the ones the Polaris bot uses.

Here's an example of what I mean: img
I'm trying to migrate to LevelUp from Polaris and it'd be nice if I didn't have to recalculate what levels to give certain reward roles and such at with a different algorithm.

Describe the solution you'd like
Add a way to use cubic functions such as the ones Polaris uses.

Describe alternatives you've considered
I don't know of any alternatives that would implement something similar?

Package "assistant" can't be installed

Describe the bug
When I try to install the package "assistant" I'm getting the following error:
Failed to install requirements: plotly, scipy, matplotlib, scikit-learn, and pandas

[06:29:59] ERROR    [red.downloader] ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
           ERROR    [red.downloader] Something went wrong when installing the following requirements: pandas
[06:30:04] ERROR    [red.downloader] ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
           ERROR    [red.downloader] Something went wrong when installing the following requirements: scipy
[06:30:11] ERROR    [red.downloader] ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
           ERROR    [red.downloader] Something went wrong when installing the following requirements: scikit-learn
[06:30:15] ERROR    [red.downloader] ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
           ERROR    [red.downloader] Something went wrong when installing the following requirements: plotly
[06:30:26] ERROR    [red.downloader] ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
           ERROR    [red.downloader] Something went wrong when installing the following requirements: matplotlib

I know it says "No space left on device", but there is. Trust me, I checked more than once 😅

To Reproduce
Just create a new server, add repo and try to install assistant package

[vrtutils] weird keyerror on `[p]getlibs`.

So I've been getting this for some weird reason, no idea why tbh

Traceback (most recent call last):
  File "[removed]", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "[removed]", line 128, in _getlibs
    packages = [str(p) for p in pkg_resources.working_set]
  File "[removed]", line 128, in <listcomp>
    packages = [str(p) for p in pkg_resources.working_set]
  File "[removed]", line 689, in __iter__
    yield self.by_key[key]
KeyError: 'jishaku'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "[removed]", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "[removed]", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "[removed]", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'jishaku'

I'm using my own fork of jishaku which you can find @ https://github.com/japandotorg/jishaku

[LevelUp] Intialize ignores prestige for hierarchy rank roles

Describe the bug
[p]lvlset roles initialize ignores prestige. This means if you do a complete reprovision (remove roles via autoremove intialize, then disable autoremove and rerun), it will only provide the roles of the current level on that prestige.

To Reproduce
Steps to reproduce the behavior:

  1. Gain roles up to prestiging
  2. Prestige, level roles are not removed
  3. Autoremove roles
  4. lvlset intiailize
  5. Roles are now gone except prestige
  6. Run initialize again
  7. Now only the rank you are at on the prestige is re-obtained, rather than all the roles leading up to prestige

Expected behavior
While this is how prestige works in games and such, this isn't how levelup is setup to work, as the autoremove for prestige is only for the prestige levels, not the rank levels. Therefore, it should re-add all the rank roles if the user is prestiged.

Screenshots

Additional context
The process of doing this can be automated via other means, but it would be better if initialize counts for this if this is how the prestige process is going to work.

Command errors for lvlset seelevels and lvltop

Describe the bug
Commands (p)lvltop and (p)lvlset seelevels not functioning.

*To Reproduce
Steps to reproduce the behavior:
Use either command (lvltop or lvlset seelevels) in Discord

│ /home/user/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py:85 in wrapped │
│ ❱ 85 ret = await coro(*args, **kwargs) │
│ /home/user/.local/share/Red-DiscordBot/data/orange/levelup/base.py:1060 in leaderboard │
│ ❱ 1060 embeds = await self.bot.loop.run_in_executor(None, func) │
│ /usr/lib/python3.9/concurrent/futures/thread.py:52 in run │
│ ❱ 52 result = self.fn(*self.args, **self.kwargs) │
│ /home/user/.local/share/Red-DiscordBot/data/orange/levelup/utils/formatter.py:168 in get_leaderboard │
│ ❱ 168 total = humanize_number(round(sum(v["xp"] for v in lb.values()))) │
│ /home/user/redenv/lib/python3.9/site-packages/redbot/core/utils/chat_formatting.py:589 in humanize_number │
│ ❱ 589 return format_decimal(val, locale=get_babel_regional_format(override_locale)) │
│ /home/user/redenv/lib/python3.9/site-packages/babel/numbers.py:421 in format_decimal │
│ ❱ 421 return pattern.apply( │
│ /home/user/redenv/lib/python3.9/site-packages/babel/numbers.py:1019 in apply │
│ ❱ 1019 number = self._quantize_value(value, locale, frac_prec, group_separator) │
│ /home/user/redenv/lib/python3.9/site-packages/babel/numbers.py:1088 in _quantize_value │
│ ❱ 1088 rounded = value.quantize(quantum)

InvalidOperation: [<class 'decimal.InvalidOperation'>]

Expected behavior
A list of levels per user to be parsed into discord

Additional context
Also with the command .lvlset seelevels, the Bot will end up losing 'heartbeat' and I have to force restart it. below is the error code for that as well.

WARNING [discord.gateway] Shard ID 0 heartbeat blocked for more than 110 seconds.
Loop thread traceback (most recent call last):
File "/home/user/redenv/bin/redbot", line 8, in
sys.exit(main())
File "/home/user/redenv/lib/python3.9/site-packages/redbot/main.py", line 528, in main
loop.run_forever()
File "/home/user/redenv/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/user/redenv/lib/python3.9/site-packages/redbot/core/events.py", line 354, in on_message
await bot.process_commands(message)
File "/home/user/redenv/lib/python3.9/site-packages/redbot/core/bot.py", line 1523, in process_commands
await self.invoke(ctx)
File "/home/user/redenv/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/home/user/redenv/lib/python3.9/site-packages/redbot/core/commands/commands.py", line 832, in invoke
await super().invoke(ctx)
File "/home/user/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 1348, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/home/user/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/user/redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, kwargs)
File "/home/user/.local/share/Red-DiscordBot/data/orange/levelup/levelup.py", line 2179, in see_levels
time = time_to_level(i, base, exp, cd, xp_range)
File "/home/percygucci94/.local/share/Red-DiscordBot/data/orange/levelup/utils/formatter.py", line 39, in time_to_level
xp = random.choice(range(xp_range[0], xp_range[1]))
File "/usr/lib/python3.9/random.py", line 347, in choice
return seq[self._randbelow(len(seq))]
File "/usr/lib/python3.9/random.py", line 245, in _randbelow_with_getrandbits
r = getrandbits(k) # 0 <= r < 2
k

Screenshot 2023-03-29 110828

Same as last report

Exception during loading of package
Traceback (most recent call last):
  File "/data/venv/lib/python3.9/site-packages/redbot/core/core_commands.py", line 188, in _load
    await bot.load_extension(spec)
  File "/data/venv/lib/python3.9/site-packages/redbot/core/bot.py", line 1680, in load_extension
    lib = spec.loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/data/cogs/CogManager/cogs/assistant/__init__.py", line 6, in <module>
    from .assistant import Assistant
  File "/data/cogs/CogManager/cogs/assistant/assistant.py", line 7, in <module>
    from .abc import CompositeMetaClass
  File "/data/cogs/CogManager/cogs/assistant/abc.py", line 7, in <module>
    from .models import DB, Conversations, GuildSettings
  File "/data/cogs/CogManager/cogs/assistant/models.py", line 6, in <module>
    from openai.embeddings_utils import cosine_similarity
  File "/data/cogs/Downloader/lib/openai/embeddings_utils.py", line 5, in <module>
    import plotly.express as px
ModuleNotFoundError: No module named 'plotly'

Seems to also require plotly

[fluent] compatibility

Hi there, I used your cog as a welcome addition to Trusty's translate cog.
Sadly, some updates ago you added the "translate" command, which is already used by Trustys,
My Users wanna keep his Flag Emoji Translation, while I wanna keep the Auto-Translate channels.
Since this is the younger cog, any chances that you make it compatible?

TICKETS SYSTEM RESTART BUG

TICKETS SYSTEM

Is your feature request related to a problem? Please describe.
When the bot is restarted and has opened tickets displays error for the LogView.
image

Describe the solution you'd like
To fix the issue you have to add one line of code in tickets/views.py
Line 625: self.join_ticket.custom_id = str(channel.id)
image

This fix the error!

Sincerely,
Creator X

[Feature Request][NoBot]Whitelist/blacklist per filter

This would be handy. I can't run errorlogs scroll to view my console as it often deletes even though I'm only trying to target a log channel with the filter.

Per filter would give better flexibility then per bot and I think would have more applications then just mine.

[NoBot] Error in viewing settings when all bots are not removed correctly

Assuming this is because all bots within the settings have been kicked from the server and not removed from the cog itself before doing so.

Traceback (most recent call last):
  File "/home/red/redenv/lib64/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/red/.local/share/Red-DiscordBot/data/modet/cogs/CogManager/cogs/nobot/nobot.py", line 92, in no_bot_view
    botlist += f"{botmember.mention}: {bot}\n"
AttributeError: 'NoneType' object has no attribute 'mention'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/red/redenv/lib64/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/home/red/redenv/lib64/python3.9/site-packages/redbot/core/commands/commands.py", line 832, in invoke
    await super().invoke(ctx)
  File "/home/red/redenv/lib64/python3.9/site-packages/discord/ext/commands/core.py", line 1348, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "/home/red/redenv/lib64/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/red/redenv/lib64/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'mention'

[support] feature request for support cog

Is it perhaps possible if you could add more buttons for separate ticket subjects?
For example: You have a button for reports and you have another button for bug reports and when you start one of the tickets it has a different ticket message.

And could you also add an option to add email support. The way it works is that when someone started a ticket, the configured email(s) address receive an notification that a ticket has been made.

Thanks for your time!

[LevelUp] [Feature] Import AmariBot Levels

Is your feature request related to a problem? Please describe.
I'd like to be able to import levels from AmariBot
It'd need the user to set an API Key

The API is documented here
https://litochee.gitbook.io/amaribot/api/api
A python library exists here
https://amaripy.readthedocs.io/en/latest/

Describe the solution you'd like
A lvlset admin importamari command

Describe alternatives you've considered
I could write my own script to create a .json file to import, using the amari api

[Feature Request] [Tickets] Abilty to set title on Modals

Is your feature request related to a problem? Please describe.
It's a little annoying to see the {NAME} Panel in the title. The ability to change this would be handy

Describe the solution you'd like
The ability to set the title of the modals.

Describe alternatives you've considered
None

Additional context
None

[LevelUp] XP progress bar showing incorrect progress

Describe the bug
When using pf the progress bar in both embed and image modes will always display at high percentages due to it calculating the difference in XP from level 1 to the next level, instead of from current level to next level.

To Reproduce
Steps to reproduce the behavior:

  1. Use the pf command
  2. Look at progress/xp bar

Expected behavior
The progress bar shows progress from current to next level

Screenshots
image
image
DiscordCanary_G4EeawOYN7

[Fluent] Translation doesn't work

The cog lets me set channels just fine, but translation has stopped working entirely.

The logs indicate a problem with the googletrans library. Is there something that can be done to fix it or is it just a matter of waiting for an upstream fix?

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.