Giter VIP home page Giter VIP logo

seina-cogs's Introduction

Seina-Cogs V3

Red-DiscordBot Discord.py License Read The Docs CodeQL Linting GitHub repo file or directory count GitHub code size in bytes GitHub repo size GitHub Repo stars GitHub forks

Lemon's Approved Cogs for Red-DiscordBot.

Tip

For support join the official Red - Cog Support server, and find me @inthedark.org in my support channel #support_seina-cogs.

Installation

Ensure you have downloader loaded.

[p]load downloader

Add Seina-Cogs to your Red instance.

[p]repo add Seina-Cogs https://github.com/japandotorg/Seina-Cogs

Install cog(s) from Seina-Cogs in your Red instance

[p]cog install Seina-Cogs <CogName>

Load the cog(s).

[p]load CogName

Note

[p] is your prefix.

About Cogs

Name Status/Version Description (Click to see full status)
AFK 0.1.1
Away From KeyboardA cog for being afk and responding when idiots ping you
Info 0.1.0
Extended info commands.
Extended info commands such as userinfo.
Tags 2.7.9
Create and use TagsCreate and use custom commands with tagscript
SeinaTools 0.1.4
My tools for Red-DiscordBotSome cool utility tools for Red-DiscordBot
BattleRoyale 0.1.2
Play battle royalePlay battle royale with your friends or join automated matches
PersonalChannels 0.1.1
Personal channel for membersPersonal channel for members
ExtendedMentionHelp 0.1.0
Customizable Mention Help Message (Supports TagScript).Set a custom message to be sent on bot mention (Supports TagScript).
NoDMs 0.1.0
Restrict messages and/or commands in DMsRestrict messages or any commands in DMs from others, with various configuration settings.
DiscordPolls 0.1.0
Manage And Log Builtin Discord Polls.Manage and also configure logging for the builtin Discord Polls.
FirstMessage 0.1.0
First MessageA simple cog for jump to first message of a channel.
Animals 0.1.2
Random animals!Random animal images & facts
MassUnban 0.1.1
Mass unban users.Mass unban users by the ban reason used
AntiLinks 0.1.1
No links allowed.Removes all links in specified channels, with the ability to whitelist roles.
StatusRole 0.1.0
Assign roles on custom status.Assign roles to users for the duration in which they have certain custom statuses
ConversationGames 0.2.5
Conversation games for membersConversation games for members
Captcha 0.1.0
Captcha verification systemCaptcha verification system
RoleUtils 1.4.0
Reaction roles, massroling, & role targetingReaction roles, massrolin & role targeting
Lock 1.1.5
Lock channelsLock channels or the whole server
DisboardReminder 1.3.7
Set a reminder to bump on disboardSet a reminder to bump on disboard
Purge 0.1.3
Advanced Purge/Cleanup.Purge (deleted) messages that meet a criteria.
FreeloaderMode 0.1.0
Ban users that leave your server right after an event or something.Ban freeloaders who leave your server right after an event or something.
ErrorHandler 0.1.0
Allow custom error message.Adds ability to replace the output of the bots error handler when CommandInvokeError is raised, all other errors get handled by the old handler.
VoiceNoteLog 0.1.0
Log the voice note sent by your server members.Log voice notes sent by your server members.
Activities 0.1.0
Discord Voice Channel Activities.Discord Voice Channel Activities.
StableDiffusion 0.1.0
Stable Diffusion using the Replicate API.Stable Diffusion using the Replicate API.
ModManager 0.1.0
Force ban/kick users.Force ban/kick users so that they stay in the ban/kick list even if someone tries to manually unban them.
AutoDelete 0.1.0
Auto delete messages in specific channels with fancy html logging.Auto delete messages in specific channels with fancy html logging.
BoostUtils 0.1.0
Booster Utilities. (WIP)Various nitro boosting utilities. (WORK IN PROGRESS)
AutoReact 0.1.0
Create automatic reactions for specific triggers or events.Create automatic reactions for specific triggers or events.

Credits

Thank you to everyone in the official red server for always being nice and helpful

seina-cogs's People

Contributors

japandotorg avatar ltzmax avatar aaa3a-aaa3a avatar cool-aid-man avatar sravan1946 avatar makeeouthill avatar dependabot[bot] avatar sourcery-ai[bot] avatar adigro avatar jackenmen avatar fakesmile9704 avatar mario31274 avatar pre-commit-ci[bot] avatar

Stargazers

 avatar Mellow avatar Omar Minaya avatar  avatar TTK avatar Arjun Satarkar avatar Kevin James O'Dea avatar  avatar Technetium1 avatar  avatar Love avatar Syed Zaid Ali  avatar  avatar

Watchers

 avatar  avatar

seina-cogs's Issues

[BattleRoyale] Error in `br auto` - asset not found.

Traceback (most recent call last):
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/.local/share/Red-DiscordBot/data/pp/cogs/CogManager/cogs/battleroyale/core.py", line 443, in auto
    await game.start(ctx, players=players, original_message=message)
  File "{HOME}/.local/share/Red-DiscordBot/data/pp/cogs/CogManager/cogs/battleroyale/game.py", line 136, in start
    image: discord.File = await self.cog.generate_image(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/.local/share/Red-DiscordBot/data/pp/cogs/CogManager/cogs/battleroyale/core.py", line 159, in generate_image
    avatar_1 = Image.open(BytesIO(await user_1.display_avatar.read()))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/asset.py", line 87, in read
    return await self._state.http.get_from_cdn(self.url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/http.py", line 769, in get_from_cdn
    raise NotFound(resp, 'asset not found')
discord.errors.NotFound: 404 Not Found (error code: 0): asset not found

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

Traceback (most recent call last):
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "{HOME}/redenv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 825, in invoke
    await super().invoke(ctx)
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1650, in invoke
    await ctx.invoked_subcommand.invoke(ctx)
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 0): asset not found

[Tags] Command block is parsed without consideration of control blocks

Filing this here, unsure if this is a bug or intended. First of all, thank you for forking and continuing the legacy of phen-cogs.

Code in question:
{if({args}==): {c:pause} | {c:play {args}}}

Expected behaviour:
When argument is empty, the tag runs only pause command. When argument is not empty, it runs the play command with args.

Actual behaviour:
Both command runs irregardless of args status.

System:
Python 3.11.5
RedBot 3.5.5
Discord.py 2.3.2
Running on Raspberry Pi 4 on Raspberry Pi OS Bullseye 64-bit, headless

[conversationgames] error with reply component

Conversationgames makes use of replying of the initial command. However, the problem with this is that this results in an error when using scheduled commands with cogs like FIFO.

Therefore, I would be nice when the cog cannot find the initial command it still sends a message but without it being a reply. Instead of sending an error.

playwire install chrome

tried to use [p]screenshot with my instance. i saw that i need to run "playwire install chrome" but the issue is my device is arm

  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/red/cogs/CogManager/cogs/seinatools/core.py", line 340, in _screenshot
    browser = await playwright.chromium.launch(channel="chrome")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/red/cogs/Downloader/lib/playwright/async_api/_generated.py", line 14340, in launch
    await self._impl_obj.launch(
  File "{HOME}/red/cogs/Downloader/lib/playwright/_impl/_browser_type.py", line 93, in launch
    Browser, from_channel(await self._channel.send("launch", params))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/red/cogs/Downloader/lib/playwright/_impl/_connection.py", line 44, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{HOME}/red/cogs/Downloader/lib/playwright/_impl/_connection.py", line 419, in wrap_api_call
    return await cb()
           ^^^^^^^^^^
  File "{HOME}/red/cogs/Downloader/lib/playwright/_impl/_connection.py", line 79, in inner_send
    result = next(iter(done)).result()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._api_types.Error: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "playwright install chrome"

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

Traceback (most recent call last):
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "{HOME}/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1023, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[5:27 PM]
  File "{HOME}/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: Error: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "playwright install chrome"```

```switching to root user to install dependencies...
++ arch
+ [[ aarch64 == \a\a\r\c\h\6\4 ]]
+ echo 'ERROR: not supported on Linux Arm64'
ERROR: not supported on Linux Arm64
+ exit 1
Failed to install browsers
Error: Failed to install chrome```

[NoDMs] Cooldown on Message Send

Spam from users in your bot's direct messages could get your bot in trouble. Have a configurable cool down between message send to encourage basic reading skills and curb abusive behavior.

[TSE] Multiple Issues with `TagScript Block` & `TagScriptEngine`

Heya lemon,
Opening up an issue if that makes you easier to work on & keep track of -

  1. Broken blocks - {shortcircuit} or {break}

Traceback Here - from your channel in cog-support server.

  1. Making {override} block to override more commands -
    - Override doesn't work in quite a few commands - from red's core, mod to other 3rd party cogs - such as in roletools It cannot override role add / role remove currently, commands like slowmode (from Mod cog), which it should be able to override, etc.

  2. In TSE, the issue with simultaneous usage of command blocks, leads to miss execution of a few.
    - In TSE currently ALL 3 command blocks execute/run at the exact same time which is problematic, so adding a delay (for a few milliseconds) or making it so it executes one after another might solve the issue plus it's the right way to do.

4.1 Currently " processing reasons" In TSE, embed block {embed(description)} - The description is capped at 2k characters, even tho embed description can easily go up to 4096 characters. This cap should be removed.
โš ๏ธ Note that - At the moment with all the "manual attributions" you still can't create the embed having more than 4k characters.

E.g. Try with ๐Ÿ‘‡ (It'll limit you at 4k characters - using ALL the attribution)
{embed(title):title}
{embed(description):description}
{embed(field):name|value}

  • The API's limit is 6k characters in total including ALL the parameters. As follows:
Field Limit
title 256 characters
description 4096 characters
fields Up to 25 field objects
field.name 256 characters
field.value 1024 characters
footer.text 2048 characters
author.name 256 characters
  • (Additionally, the combined sum of characters in all title, description, field.name, field.value, footer.text, and author.name fields across all embeds attached to a message must not exceed 6000 characters. Violating any of these constraints will result in a Bad Request response.)

4.2 AND currently in TSE, embed JSON - You can't create an embed having more than 2k characters (even tho the limit is 6k characters in total). This limit should also be removed.

  • E.g. Try creating a tag with {embed({"title": "title", "description": "description"})} (include all the other parameters title, descriptions, fields, author, footer ), You will see it is limited to 2k characters.

โ€‹
โ€‹
5. This one is not really an issue: But in {target} block -

target = tse.MemberAdapter(ctx.message.mentions[0]) if ctx.message.mentions else author

Can this use/accept ID (from the user_message - by checking if the message has user ID ) instead of taking the ID from user_mention !!
- Because target block won't work if you pass just the ID (of a targeted user), and IDs are the first thing that you copy then you add <@> to make it mention, so being a user you're by default passing IDs first
โ€‹
โ€‹
6. In Tag global
tag_name: TagName(global_priority=True),

  • tag global add should behave just like adding a guild tag with tag add. Currently with tag global add it does not prompt you to override the tag with new data (so you'll have to delete > add it again).
    image
  • Same issue with tag global ++ (tag global pastebin); it should behave just like adding guild tag ++

Proposed Updates on TSE

  • Publishing the {allowedmention} block - {allowedmentions(role1, role2, etc)} (only the mentioned roles will be pinged)
  • Previous conversation link - Here from #testing channel in red.
  • Fixing the command - tag usage/stats - Discord sometimes messes up the code block, with their unannounced changes to the API which breaks the embedded code block, Hence its better to ditch the code block and just use an embed for it, which won't get damaged by those changes
  • New {lower} & {upper} block - Sravan already has PRs for it.
  • Adding scope to accept multiple delimiters to {embed(footer)} from - , ; | ~ (users can pick and choose) - as footer breaks with ANY conditional blocks (if, and, or, any etc) due to the presence of |.
  • Currently {embed(field)} is not affected by this tho to keep everything safe, we can also add the same to the field to accept all of the delimiters.

(Changing the delimiter to accept Multiple characters would solve the issue, but it won't be a huge breaking change per se. - Fewer tags will be broken if not none, this way)

I think, this is all the problems we have with TSE at the moment, I hope you can get back to this as soon as possible as it's been pending for many months!

[Conversationgames] Error with wouldyourather

I am receiving the following error when running [p]wouldyourather

`Traceback (most recent call last):
File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 229, in wrapped
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/cogs/CogManager/cogs/conversationgames/core.py", line 101, in _wyr
result = await client._request("wyr", rating)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/cogs/CogManager/cogs/conversationgames/http.py", line 94, in _request
return await self.request("GET", f"/{endpoint}", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/cogs/CogManager/cogs/conversationgames/http.py", line 61, in request
return await self.__request(method, route, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/cogs/CogManager/cogs/conversationgames/http.py", line 41, in __request
cache = SQLiteBackend(
^^^^^^^^^^^^^^
File "/data/cogs/Downloader/lib/aiohttp_client_cache/backends/init.py", line 23, in init
raise original_exception
File "/data/cogs/Downloader/lib/aiohttp_client_cache/backends/init.py", line 52, in
from aiohttp_client_cache.backends.sqlite import SQLiteBackend
File "/data/cogs/Downloader/lib/aiohttp_client_cache/backends/sqlite.py", line 11, in
import aiosqlite
ModuleNotFoundError: No module named 'aiosqlite'

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

Traceback (most recent call last):
File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
await ctx.command.invoke(ctx)
File "/data/venv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1023, in invoke
await injected(*ctx.args, **ctx.kwargs) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/venv/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: ModuleNotFoundError: No module named 'aiosqlite'`

[ThreadOpener] AdvancedTagScriptEngine doesn't support discord-py 2.4.0.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
advancedtagscriptengine 3.1.4 requires discord.py==2.3.2, but you have discord-py 2.4.0 which is incompatible.

[Purge] Feature Request: Add the ability to purge messages from a User by ID that is no longer in the server

Hi and thankyou for the amazing cog!

I just had the request to be able to Purge a users messages by ID when they no longer exist within the server. In the use-case I am looking at we have banned the user but currently do not have an easy way to purge their messages particularly to respect their privacy in "Real Life" channels.

Of course I specified by User ID but I only specified that as it may not be practical to try and fetch a user ID for a user not in the server.

Thanks!

ThreadOpener cog attempted to install TagScriptEngine, but the version installed is outdated.

threadopener: The ThreadOpener cog attempted to install TagScriptEngine, but the version installed is outdated. Shut down your bot, then in shell in your venv, run the following commands:
pip(3) uninstall -y TagScript
pip(3) uninstall -y TagScriptEngine
pip(3) uninstall -y AdvancedTagScriptEngine
pip(3) install AdvancedTagScriptEngine==3.1.4
After running these commands, restart your bot and reload Tags. If it continues to fail to load, contact the cog author.

I have already done what was asked, but no luck.

[Captcha] Exception on join/leave

This error happens on a daily basis, can't tell if it's when a user leaves, or joins as i've seen it in both cases.

[2024-06-25 16:40:40] [ERROR] discord.client: Ignoring exception in on_member_join
 Traceback (most recent call last):
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/client.py", line 441, in _run_event
     await coro(*args, **kwargs)
   File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/captcha/core.py", line 279, in on_member_join
     await self._captchas[member.id].delete()
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/message.py", line 859, in delete
     await self._state.http.delete_message(self.channel.id, self.id)
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/http.py", line 741, in request
     raise NotFound(response, data)
 discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message

 [2024-06-25 16:54:52] [INFO] red.vrt.levelup.models: Creating backup of the config

 [2024-06-25 16:58:30] [ERROR] discord.client: Ignoring exception in on_raw_member_remove
 Traceback (most recent call last):
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/client.py", line 441, in _run_event
     await coro(*args, **kwargs)
   File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/captcha/core.py", line 307, in on_raw_member_remove
     await self._captchas[member.id].delete()
           ~~~~~~~~~~~~~~^^^^^^^^^^^
 KeyError: 1254853289594458226
 [2024-06-25 16:58:40] [ERROR] discord.client: Ignoring exception in on_member_join
 Traceback (most recent call last):
   File "/home/glas/redenv/lib/python3.11/site-packages/discord/client.py", line 441, in _run_event
     await coro(*args, **kwargs)
   File "/mnt/hdd/data/lenabot/cogs/CogManager/cogs/captcha/core.py", line 276, in on_member_join
     for user_try in self._user_tries[member.id]:
                     ~~~~~~~~~~~~~~~~^^^^^^^^^^^
 KeyError: 1254853289594458226```

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.