Coder Social home page Coder Social logo

rahuletto / simply-djs Goto Github PK

View Code? Open in Web Editor NEW
73.0 3.0 33.0 1016 KB

The easiest way to build sophisticated systems in your Discord bots.

Home Page: https://simplyd.js.org

License: Other

Shell 0.02% TypeScript 99.98%
easy-webhooks simplydjs buttons tictactoe calculator ticket-system steal-emojis djs-webhooks discord-ticket discord

simply-djs's Introduction

The simplest way to build complex Discord bots.

Made by Rahuletto#0243



Version Downloads CodeFactor

Documentation Support

Now returning with v4 (DiscordJS v14 support)

This was too late. But we will support v15 as soon as its released.

Thank you CyberJack#6350 for helping me



๐Ÿ–ฅ๏ธ How to install ?

npm install simply-djs
yarn add simply-djs
pnpm add simply-djs

What's new ๐ŸŽ

v4.1.1

  • JSDoc updated !. Now every single function gets intellisense upgrade
  • Bug fixes

๐Ÿ“„ License

You are free to:

  • Share: Copy and redistribute the material in any medium or format

Under the following terms:

  • Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

  • NonCommercial: You may not use the material for commercial purposes.

  • NoDerivatives: If you remix, transform, or build upon the material, you may not distribute the modified material.


๐Ÿ‘ฅ Contact us/Support

https://discord.gg/3JzDV9T5Fn

simply-djs's People

Contributors

a-k-o-r-a avatar dragiez avatar gotowka avatar jebediah47 avatar only-moon avatar rahuletto 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

Watchers

 avatar  avatar  avatar

simply-djs's Issues

Error upon starting the bot

Describe the bug
Pretty much when i try starting the bot I get this error: SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47

To Reproduce
Steps to reproduce the behavior:

  1. Run the bot
  2. Try the function
  3. See error

Expected behavior
The bot starting ig lol

Screenshots
https://gyazo.com/cc483cecccff90c6b5d63584e7b1a509

Versions (please complete the following information):

  • Discord.js Version v13
  • simply-djs Version latest

Additional context
I'm dumb

Security Vulnerabilities - Outdated NPM Packages

You currently use:

"dependencies": { "ms": "^2.1.3", "node-fetch": "2.6.1", "quickmongo": "^3.0.0" },

These contain security vulnerabilities!!

Please change them to the latest versions as shown in example below.

"dependencies": { "ms": "^2.1.3", "node-fetch": "3.1.0", "quickmongo": "^4.0.0" },

Please always keep your node packages up to date!

Hope you can bring out an update with the updated npm packages

rankCard bugging - Poppins Semi-Bold Not-Rotated

Yesterday (08/05/2022) my bot explode an error in the rankCard.

This is the error
image

This is the function that send the image from rankCard

async function SendLevel() {
    const msg = await message.reply(`${e.Loading} | Carregando...`) // Loading message

    let reData = await Database.User.findOne({ id: user.id }, 'Walls.Set') // Get the URL IMAGE from database

    try {
        Database.updateUserData(message.author.id, 'Timeouts.LevelImage', Date.now()) // Setting a timeout to block spams

        await simplydjs.rankCard(client, message, {
            member: user, // String
            level: level || 0, // Number
            currentXP: exp || 0, // Number
            neededXP: xpNeeded || 0, // Number
            rank: rank || 0, // Number,
            slash: false // It isn't a slash command
            background: reData.Walls?.Set || LevelWallpapers?.bg0?.Image || null // Image URL from Discord Chats || It's work perfectly
        }).then(() => {
            msg.delete().catch(() => { }) // Delete the loading message
        }).catch(err => { ErrorHandler(err) })

        return

    } catch (err) { return Error(message, err) }
}

This is the amazing rankCard with a custom background
image

The bug make this...
image

Chat bot errors and stops when using certain characters

Describe the bug
When you use characters that aren't in the English alplabet, like รง for example, the bot crashes with the following error:

`C:\Users\asown\Documents\GitHub\ASOwnerYT-Pet-Discord-Bot\node_modules\node-fetch\lib\index.js:272
                                return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
                                                           ^
FetchError: invalid json response body at https://api.affiliateplus.xyz/api/chatbot?message=รง&botname=ASOwnerYT%27s%20Pet&ownername=Rahuletto#0243&user=402581422176600064 reason: Unexpected end of JSON input
    at C:\Users\asown\Documents\GitHub\ASOwnerYT-Pet-Discord-Bot\node_modules\node-fetch\lib\index.js:272:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  type: 'invalid-json'
}

To Reproduce
Steps to reproduce the behavior:

  1. Start the bot
  2. Type invalid characters in the chatbot channel
  3. The bot will crash with the error above

Expected behavior
The bot should just print the error to the console and keep running. Try and catch doesn't prevent the bot from crashing.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Firefox
  • Version: Latest

TypeError

image
TypeError: msg.createButtonCollector is not a function

Error: DiscordAPIError: Unknown Webhook

Describe the bug
I get this error when I use embedPages:
Error Occured. | embedPages | Error: DiscordAPIError: Unknown Webhook
at RequestHandler.execute (E:\VerPixia\Xatis\node_modules\discord.js\src\rest\RequestHandler.js:349:13)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (E:\VerPixia\Xatis\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
at async InteractionWebhook.send (E:\VerPixia\Xatis\node_modules\discord.js\src\structures\Webhook.js:192:15)
at async Object.embedPages (E:\VerPixia\Xatis\node_modules\simply-djs\src\embedPages.js:129:5)

To Reproduce
I do not know what I do wrong, but this is my code:
simplydjs.embedPages(client, interaction, pages, {
pgCount: true,
skipBtn: true,
delBtn: true
})

Expected behavior
That it works

Versions (please complete the following information):

  • Discord.js Version [e.g. v13] 13.3.1
  • simply-djs Version [e.g. v2.0.0] 2.5.2

Bug Report

Describe the bug
Does not support DiscordJS v14

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade DiscordJS to v14

Expected behavior
Work fine

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Discord.js Version v14.5.0
  • simply-djs Version Latest

Additional context
None

Suggestion System - Reaction Bug

Describe the bug
With the suggestion system, if you have 2 active suggestions, and you reject one of them, the next one you reject will have the same reason.

To Reproduce
To reproduce it just use the suggestion system, make 2 suggestions, and try to accept both, both will have the same reason.

Expected behavior
That each suggestion has a reason separate from the others.

Versions (please complete the following information):

  • Discord.js Version: 13.6
  • simply-djs Version: latest

Ticket System Crash

Describe the bug

When I create the ticket from the ๐ŸŽซ Ticket button, it works but when I click on it again, it crashes the bot without telling me that I already created a ticket
image

Versions (please complete the following information):

  • Discord.js Version v13
  • simply-djs Version ^2.5.2

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.