Simply DJS Documentation

website·Indexed 29 days ago

https://simplyd.js.org/

A utility package for Discord.js v14 that simplifies the creation of complex bot systems. It includes built-in systems for giveaways, tickets, starboards, suggestions, and bump reminders, as well as general utilities like an embed creator, paginators (buttonPages and menuPages), and a chatbot with Chat-GPT mode. The library provides extended types such as ExtendedInteraction and ExtendedMessage, and offers a connect() function for MongoDB integration.

Tokens
15.9K
Snippets
128
Records
152
Agent score
55%

What's inside Simply DJS

  1. Overview of the simplyd chatbot system

    The simplyd chatbot is an advanced, intelligent chatbot system designed to act as a technical assistant and companion.
  2. Overview of simply-djs

    simply-djs is a third-party package for Discord.js that allows developers to implement complex bot systems with minimal code. To use this package, developers must be familiar with the fundamentals of JavaScript and the Discord.js library.
  3. Use the Button Role Handler in simply-djs

    The Button Role Handler is a utility within simply-djs designed to manage the button role system, allowing developers to handle specific button roles and their associated behaviors.
  4. Use the Disboard bumpReminder system

    The Disboard system provides a bump reminder feature that notifies users when it is time to perform a 'bump' (a common action on Disboard to increase server visibility).
  5. Understand the SuggestResolve return type

    The simplydjs.suggest function returns a promise that resolves to a SuggestResolve object containing details about the created suggestion.
    {
      suggestion: string; // the suggestion provided
      channel: TextChannel; // the channel to send the suggestion
      user: GuildMember; // the user who suggested
    }
  6. Implement a giveaway system with simplyd.js

    The giveaway system provides a powerful yet simple way to manage giveaways. To use this system, the manageGiveaway() function must be called/implemented to handle the giveaway logic.
  7. Create button roles using betterBtnRole

    The betterBtnRole system provides a Button Role builder that allows administrators to create custom button roles. To use this functionality, the user must have the manageBtnRole() permission.
  8. Use the manageTicket Ticket Handler

    The manageTicket handler is a specialized Ticket Handler designed for the simplydjs ticket system to manage ticket creation and lifecycle.
  9. Migrate deprecated functions to renamed versions

    Several functions have been deprecated and renamed to provide more meaningful names. Update your code to use the new function names listed below:
    // Old Function Name -> New Function Name
    automeme()         => meme()
    bumpSystem()       => bumpReminder()
    embedCreate()      => embedCreator()
    embedPages()       => buttonPages()
    giveawaySystem()   => giveaway()
    suggestSystem()   => suggest()
    ticketSystem()    => ticketSetup()
    manageSug()        => manageSuggest()
  10. Example: Launch a customized RPS game

    This example demonstrates how to launch an RPS game with strict mode enabled, custom button styles from discord.js, and a custom color for the in-game embed.
    const { ButtonStyle } = require('discord.js')
    const simplydjs = require('simply-djs')
    
    simplydjs.rps(interaction, {
      strict: true,
      buttons: {
        rock: { style: ButtonStyle.Primary },
        paper: { style: ButtonStyle.Success },
        scissor: { style: ButtonStyle.Danger }
      },
      embed: {
        game: {
          color: simplydjs.toRgb("#406dbc")
        }
      }
    })
    
  11. Convert discord.js EmbedBuilder to CustomizableEmbed

    To use a standard discord.js EmbedBuilder as a CustomizableEmbed in simply-djs, call the .toJSON() method on the builder. This converts the builder into an APIEmbed object, which is the format required by simply-djs functions.
    const simplydjs = require('simply-djs');
    const { EmbedBuilder } = require('discord.js');
    
    const embed = new EmbedBuilder()
        .setTitle("Converting to CustomizableEmbed")
        .setColor(simplydjs.toRgb('#406DBC'));
    
    // Pass the JSON representation of the embed to the simply-djs function
    simplydjs.someFunction(interaction, {
        embed: embed.toJSON()
    });