GithubHelp home page GithubHelp logo

blackwolfwoof / yagpdb-cc Goto Github PK

View Code? Open in Web Editor NEW
116.0 15.0 63.0 4.51 MB

Custom commands for the YAGPDB Discord bot🤖

License: MIT License

discord custom-commands yagpdb yagpdb-ccs yagpdb-cc yagpdb-discord-bot

yagpdb-cc's Introduction

 YAGPDB Custom Commands

Introduction

You can find everything about me in my GitHub bio : ) which is kept up to date.


News

On my discord server there is now a designated section for YAGPDB. There you can find updates for my custom commands, other GitHub repositories from the community and a small support / discussion channel.
So if you are looking for new custom commands take a look ;) there


List of custom commands

To receive update notifications for these custom commands join my discord server and follow the announcement channel #│📢cc-updates or give yourself the role that pings you on important updates.

Auto Moderation
  • Open Folder
    anti phishing - With this code you can protect your servers against those steam trade phishing link sending self-bots
    domain list - The domain list for the anti-phishing code

  • Open Folder
    anti raid - This code will toggle the automod ruleset to remove raiders
    Remember that you also need an automod v2 ruleset as explained in the readme : )

Autohelp Embed
  • Open Folder
    command - Command that displays the main page
    reaction - Reaction code that sends a dm to the user on reaction
Counting Code
  • Open Folder
    converter - Can be used to switch from the old counting system from the YAGPDB server to the new one
    counter - A simple code that tells you how much you or another user has counted
    main counting code - A custom command to manage a counting channel
    pagination - The pagination code for the leaderboard
    topcount - A leaderboard to see who counted the most
CustomCommands Command Replacement
Database Manipulation
Misc
  • Open folder
    avatar - Shows the avatar of the user (supports mentions)
    cloneroles - Clones all roles from user A to user B
    downtime announcement - This interval code will announce when YAGPDB was offline. This will ONLY run if YAGPDB comes back online again!!
    fakeban - Just like ban but fake
    image reaction - YAGPDB will react on images and videos. You can optionally turn on an auto-delete for non-images.
    message link - Quotes messages from message links
    mute checker - This handy dandy command will tell you if muted users can still type and which roles & channels are affected
    new account warning - You will get warned if a member with a brand new account joins the server
    onewordstory - A one word story is a sentence that multiple people have to write together by only sending one word at a time.
    snowflake converter - Calculates time between 2 IDs
    wordchain - A word chain is a game where players come up with words that begin with the letter or letters that the previous word ended with.
    yagpdb update - This will notify you when yagpdb gets an update. It will tell you the version numbers and time
Quick Moderation menu
  • Open Folder - No need to remember all moderation commands. Just click a reaction and you are done
  • command - Command that displays the embed that can be controlled via reactions
    reactions- Reaction code
Poll
  • Open Folder - A poll replacement code that can force people to only react to one emoji by adding -single anyehere into the poll
    command - The command that creates the poll and adds the reactions
    reaction - Reaction code
Reaction Embed
  • Open Folder - An embed that can be controlled via reactions that displays anything you want
    reaction - Reaction code
    setup - Setup that sends the embed for the first time
Snippet System
  • Open Folder
    pagination - The pagination / reaction code is needed so you canswitch from page to page and delete lists
    snippet - The main command to create, delete, search and list snippets
    snippet stats - The snippet stats will show you how often allsnippets were run in the last 7 days
    snippet stats cleanup - This code is used to clean up the old snippetstats
Stickyroles
  • Open Folder
    Join Message - The main code that gives the roles back after re-joining the server
    Leave Message - The code that makes sure the database doesn't fill up too much
    Reaction - The main code to save the stickyroles
    Regex - The main code to save the stickyroles
Sticky Message
  • v1 - Open Folder
    sticky message - This message will always stick to the bottom of the channel

  • v2- Open Folder
    command - A more customizable sticky message version. The command part of sticky message 2 from the YAGPDB Community & Support server
    regex - A more customizable sticky message version. The regex part of the sticky message 2 from the YAGPDB Comminity & Support server

Templates for coding
  • Open Folder
    bypass limit - This template shows how you will be able to bypass the X uses per CC limits on some functions
    bypass limit example - This code is an example that bypasses the execAdmin limit (5 per cc)
    interval time - Run your custom command at a specified time
    permission checker - A code snippet for checking permissions of a user
    rolecolor - Outputs the role color of the highest role the current user has

License

You do not have to include the full license in the code because it is too long. That's why I made this small text that has to stay in the code.
If that license can not be found in the code on this repository, you can do whatever you want with the code and I won't even care if you claim you made it.

Small license text

Copyright (c): Black Wolf, 2021
License: MIT
Repository: https://github.com/BlackWolfWoof/yagpdb-cc/

Custom command repositories

Official repository

If you are searching for more custom commands or even want to add some you will find a lot of them there :).

Readme Card
If you are looking for a link to the repository, click here. Otherwise use the card above to visit the website.

More repositories

If you are looking for more community made custom commands you can join my Discord server and look at the list of repositories in #│🌐github-repositories or search for 🔍 yagpdb-cc on GitHub.
We will not guarantee that the other user repositories are safe to use.
Safe to use repositories are marked with ain #│🌐github-repositories.


Other links

YAGPDB Community & Support Official support server
YAGPDB Documentation Official documentation
YAGPDB Learning page Official learning page
Chill and Play ❤ My server :)

yagpdb-cc's People

Contributors

blackwolfwoof avatar borbot33 avatar daviid1337 avatar daviiid1337 avatar dz-tm avatar fravbox avatar galen8183 avatar jo3-l avatar l-zeuch avatar matiasmfm2001 avatar max8224 avatar moleculor avatar notolabrusfisicola avatar piterxyz avatar ranger-4297 avatar shadownight573 avatar sinarck avatar soggysaussages avatar

Stargazers

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

Watchers

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

yagpdb-cc's Issues

Improove the readability of all README.md's [1/13 Done]

Not everyone is a pro

People have struggled in the past to understand how to add custom commands to their servers from repositories & how to set them up right.
In the last few weeks or months a few volunteers have created https://yagpdb-cc.github.io/ which makes it a lot easier to see how to add the custom commands to the server and what you have to take a look at when adding them.
I think it would be a good addition to create some kind of template every custom command in the README.md of the subfolders, so everyone knows what to look out for & how to set it up if they add it to their server.

A template for every custom command

  • Finish all pending work so i can focus on this change
  • Create a template with options like 'trigger'
  • Add 'trigger type' to the list
  • Add 'configurable variables' to the list
  • An image showing the custom command in action
  • Issues & disclaimers

For the main README.md

  • A section that explains how to add custom commands from my repository to the server

Add a validation method to creating snippets

right now snippets need to be created via ;snippet add "name/test" "" text and the "" has to be empty if no image should be added.... Uh yea and people always forget that and mess it up or do other shit and that then breaks like half of the snippet commands

Counting System is no longer functioning.

I was previously using the system found on the YAGPDB CC GitHub but decided to switch to your counting system. It worked for a few hours, then the count went backwards ~100 and the system has since stopped working. I tested it via making a new discord server with a new channel, and your counting system worked without issue on the new server, but will not work on the original server I have it in.

The command functionality is as follows:
• -setcount: functional
• -count: non-functional YAGPDB response is always "@user hasn't counted yet"
• -topcount: non-functional no YAGPDB response is received

An error caused the execution of the custom command template to stop.

"Failed executing CC #12, line 73, row 19: executing "CC #12" at <exec "kick" $userid ...>: error calling exec: exec/execadmin, run: The Kick command is disabled on this server. Enable it in the control panel on the moderation page.
72 "icon_url" $usera)
73 "description" (exec "kick" $us...
74 "color" 0x77FF68)}}"

Database/Map dballmap: Error calling sdict: cannot convert data of type: string

As I'm still new to coding in Go and am not confident in fixing this issue myself. After Using the example dballmap command you gave in your README
image

I get the following error:
image

How would I go about fixing this? Currently trying to make a custom database to store a banlist on Instagram usernames to refuse them access to the server via the discord autorole command I made for the server.

dbget fails when attempting to display slice of 8192 int64s

I was attempting to find the 'true' available size of a DBEntry (since an int64 probably is only going to be taking up eight-or-so bytes, and not 18+ bytes) by taking a single slice with a single int64 (.Message.ID, specifically) in it and doubling it.

I got up to 8192 entries before YAGPDB complained I was trying to make a slice that was too large. (Apparently it won't make a slice of 16,384 entries.) So, just to see how big dbget said the DBEntry was, I tried to check its contents/size out with dbget. I got this instead:

image

(For searchability, I'll reproduce the text as best I can:

An error caused the execution of the custom command template to stop:
Failed executing CC #39, line 46, row 32: executing "CC #39" at <complexMessage "file...>: error calling complexMessage: file length for send message builder exceeded size limit

45    {{if or (gt (len (reReplace `​\...
46        {{$x = sendMessageRetID ni...
47        {{$out = (index (getMessag...

)

In case you were curious, dball shows the following:

image

(That's "155kB" in a 100kB entry. Yeah, I know, it counts JSON characters rather than anything closer to reality. Just thought you might be curious. A structure with 8192 8-byte numbers would be closer to 65kB. Ish. I think. Probably.)

(And yes, I'm actually planning on doing something that will end up with a slice with potentially that many int64s in it. More, really. Was thinking ahead to needing to do multiple DBEntries for it.)

Message Link pings users again if they were pinged in the original message

re: https://github.com/BlackWolfWoof/yagpdb-cc/blob/master/Misc/message%20link.gotmpl

If the original message has a ping and an embed, yag recreates the message entirely, thus pinging all the users again.
This is really only an issue with messages from the Sesh event bot. So perhaps simply ignoring messages from this user would be a solution.

Alternatively, if stripping the pings is not doable, adding a function to ignore message links in carats( e.g. how <https://url.com> does not create an embed in discord), that could also work.

I love this custom command... It should be included by default in yag. So thanks for making it. I hope you could fix this, though!

Thank you.

image

Database/reset: dbresetkey: Cannot give argument to non-function $dbcount

As I'm not sure what the intention behind that code was, I'm hesitant to open a pull request.
However, this error has been showing up for several users, including me. See the screenshot for a full break down.

image of error

Relevant code:

{{editMessage nil .ExecData.id (cembed "author" (sdict "icon_url" "https://cdn.discordapp.com/emojis/714051544265392229.gif" "name" (print "This might take a while... (" (sub .ExecData.all ($dbcount .ExecData.key)) "/" .ExecData.all ")")) "description" "Please wait until the command is done running.\n**Do not run dbresetkey again until it is finished!**\nYou will be pinged if the reset is done :)" "color" 0xFAA61A)}}

As we can see, it is not an issue on user's end, rather an issue on the code side -- perhaps a missing or slipped parenthesis.

image_reaction.yag on URLs not functioning

Hi, currently as it stands the coding within ImageReaction allows any URL to be posted whether its an image URL or not. Something within the Embed Media cmdlet doesn't appear to be functioning correctly and its either not looking at URLs ending extension i.e. ".jpg" similar to .Message.Attachments OR its too wide-open and needs to query from something like the AutomoderationV2 List function so we can Whitelist sites.

P.S. amazing script and appreciate the work and time that went into this. Not really a deal breaker if nothing can be done for the things I mentioned. Just more of pointing out some things that may or may not need to be addressed.

imagereact_not_blocking_any_non_image_url

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.