Giter Club home page Giter Club logo

core's Introduction

Discord server

Discord-Dashboard

  • Easier creation of a Dashboard for Bot using Node.js
  • No need to know how the API works, no need to write it
  • Easy configuration
  • Community support
  • Free for no-profit usage
  • Paid for profit usage

Install

npm i discord-dashboard
//or
yarn add discord-dashboard

Get help

Join our Discord Support Server

Discord server

Documentation

Tutorial:

Straight-written DOCS can be found at the URL: https://dbd-docs.assistantscenter.com/

We'd prefer using Tutorial 😅

Contact

Licenses

The project is covered by a Shareware (CC BY-NC-SA 4.0) licence. This means that the project is theoretically free and limited, but it has a paid versions.

What types of shareware license does the discord-dashboard project fall under?

  • OpenSource License: Free. Personal usage only. Non-profit.

For profit usage: Please contact use us to resell rights. Email: [email protected]

You can generate OpenSource License there: https://licenses.assistantscenter.com/

Star History

Star History Chart

v3 Info

The v3 version of the project designed using solutions like Fastify+Next.js is coming!

Stay tuned:

Discord v3 Updates: https://discord.gg/Nkc8MWxHRD


© 2020-2023 Assistants Center, All rights reserved

core's People

Contributors

abadima avatar breftejk avatar casperg267 avatar default-01 avatar dependabot[bot] avatar exzotic5485 avatar gamearoocodes avatar iamkingclutch3 avatar ilaicraftyt avatar imidnights avatar plaindevelopment avatar ragnarlothbrok-odin avatar thatguyjamal avatar zvapor-dev 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

core's Issues

User is undefined

Describe the bug
i am doing console.log for the results i get on the dashboard for testing.

To Reproduce
Steps to reproduce the behavior:
this is my code
https://sourceb.in/7iOVVr7Y0q
Expected behavior
getting an object full of user data (id - username - discriminator - voiceChannel)

Screenshots
image

Additional context
last version of the module
discord.js: 13.7.0

Cannot read property 'hasPermission' of undefined

Hello, there is an error in your code that makes your dashboard unusable

File : app.js
Line : 60
Code : if (!bot.guilds.cache.get(req.params.id).members.cache.get(req.session.user.id).hasPermission('MANAGE_GUILD'))
Error : Cannot read property 'hasPermission' of undefined

Ty betoniarzu.

Dlaczego mnie wywalasz z teamu. To jest bardzo nieładne zachowanie. Dostałem prawie zawału, i nie dostałem ani przeprosin ani podziękowań za cudowne kontakty. Mój prawnik wystosuje dla Pana pozew. Widzimy się w sądzie ty betoniarzu ty.

sessionFileStore Default

TODO: sessionFileStore should be set by-default to false, currently default value is true.

The change is planned because some people cannot use the sessionFileStore feature and it blocks them from creating a session without setting it to false.

Themes

The basic design of the Dashboard isn't the best, but it's not the worst either. Everyone has the option to edit it, but it is limited and with every module update it will break.


That's why we present THEMES: Premium Feature

Themes are assumed to be more flexible (even for each line of text) of the page appearance. The operation of the Dashboard will remain the same, but the appearance will change up to 100 times more for the better.

However, we think a Dashboard with all these features for free is a lot. Therefore, Themes will be a paid addition.

Each Theme will need to be purchased and registered. Unauthorized use of Themes may result in legal action.


We want to divide themes into 3 categories:

  • Supporter: File access, no footer text editing.
  • Premium: Access to files, ability to remove or edit text from the footer.
  • Extra: Access to files, the ability to remove or edit the text from the footer, the ability to request a slight tweak / change of appearance.

The prices will be:
Supporter - $15, Premium - $20, Extra: $25 *

* - Prices are in the USD.


Payment is only accepted via PayPal or domestic transfer (Poland). The payment is one-time.

example.env

What to do in repl.it?

.env files are now in secret environment tab in repl.it so .env files are not supported anymore.

SSL support

Support for https servers (using SSL certificate and key).

FYI, Licensing trash

This new "license" system makes the entire software not for helping users but for profit. I am here to request the licensing be removed as it is a obstacle for small developers looking to grow and when the package is obfuscated you could include anything to maliciously attack the user's bots.

Discord.js v13 support

Future TODO: Support for Discord.js v13 (including changing the user permissions checking function for example).

The dashboard will still be backwards compatible with Discord.js v12, and the version is assumed to be detected automatically without having to configure this in the config.

Problem with shards.

Problem description

There's a problem with the "Traditional Sharding" method to shard the bot.
Traditional Sharding consists on create a new ShardingManager that will execute the same code splitting the connections to Discord.

When two shards are being runned, and when Discord-Dashboard inits, will give an error.

Code (Reproduction steps)

index.js:

let manager = new ShardingManager("./bot.js", { token: process.env["token"], totalShards: 2 }); // take note of the totalShards

manager.on("shardCreate", (shard) => {
    console.log("New shard " + shard.id + " has been launched, wait until a confirmation of success launch.");
});

manager.spawn()

bot.js Here is the bot, new Client, etc, etc, i don't share all the code because it will be useless:

client.login(process.env["token"]);

const DBD = require('discord-dashboard');

module.exports = client;

const Dashboard = new DBD.Dashboard(require("./dashboard/index"))

Dashboard.init()

Error given

Here is the problem, as ShardingManager running the code two times, express wil run two times, then it will give the next error, as another express instance is already using the port:

Error: Error: listen EADDRINUSE: address already in use :::80

The setNew returning null

I am using DBD channelsSelect form to get the channel .But the newData arg it returned null even though i selected a channel. This is not only for the channelSelect form , i tried using the roleSelect form but it also returned null. I think the setNew function itself is not working for me .

Here is my page settings

settings: [
{
categoryId: "test",
categoryName: "Welcome System",
categoryDescription: "Customize the welcome message and much more here ",
categoryOptionsList: [
{
optionid: "hey",
optionName: "Welcome Channel",
optionDescription: "Set Or Reset The Welcome Channel of the server",
optionType: DBD.formTypes.channelsSelect(false, "GUILD_TEXT"),
getActualSet: async ({ guild }) => {
return welcomehannel[guild.id] || null;
},
setNew: async ({ guild, user, newData }) => {
console.log(newData);
welcomehannel[guild.id] = await newData;
return;
}
}
]
}
]

Ogromny problem.

Projekt jest tak bardzo dobry, że dostałem prawie zawału. Jestem zniesmaczony tymże zdarzeniem. Oczekuję szybkiego odszkodowania w postaci przeprosin i podziękowań. Masz na to 5 minut.

Error while running: FetchError: request to https://dbd-external-stats.assistants.ga/registerProject failed, reason: getaddrinfo EAI_AGAIN dbd-external-stats.assistants.ga

image

FetchError: request to https://dbd-external-stats.assistants.ga/registerProject failed, reason: getaddrinfo EAI_AGAIN dbd-external-stats.assistants.ga
at ClientRequest. (C:\Users[user]\Documents[folder]\Node[project]\node_modules\node-fetch\lib\index.js:1483:11)
at ClientRequest.emit (node:events:394:28)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:394:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'EAI_AGAIN',
code: 'EAI_AGAIN'
}

I am getting this issue whenever I try running Dashboard, this is my dbd.js file:

require("dotenv").config();
const DBD = require("discord-dashboard");
const CaprihamTheme = require("dbd-capriham-theme");
const local = require("../Outhouse/local.json");
const fs = require("fs");
const path = require("path");
const { Client } = require("discord.js");
const client = new Client({
  intents: ["DIRECT_MESSAGES", "GUILDS", "GUILD_MEMBERS", "GUILD_MESSAGES"],
});
client.login(process.env.TOKEN);
function getPrefix(guildid = "guildid") {
  return local.prefix[guildid] || local.prefix.guildid;
}

async function updatePrefix(guildid = "guildid", newPrefix = "??") {
  const previous = local.prefix[guildid];
  local.prefix[guildid] = newPrefix;
  const toPut = JSON.stringify(local, null, 2);
  await fs.writeFileSync(
    path.join(__dirname, "..", "Outhouse", "local.json"),
    toPut,
    { encoding: "utf-8" }
  );
  return { previous, new: newPrefix };
}

const Dashboard = new DBD.Dashboard({
  port: 80,
  client: {
    id: process.env.CLIENT_ID,
    secret: process.env.SECRET,
  },
  redirectUri: "http://localhost/discord/callback",
  domain: "http://localhost",
  bot: client,
  ownerIDs: [],
  theme: CaprihamTheme({
    websiteName: "Website",
    iconURL: "https://assistants.ga/ac_logo_v6.png",
    index: {
      card: {
        title: "Assistants - The center of everything",
        description:
          "Assistants Discord Bot management panel. Assistants Bot was created to give others the ability to do what they want. Just.<br>That's an example text.<br><br><b><i>Feel free to use HTML</i></b>",
        image:
          "https://www.geeklawblog.com/wp-content/uploads/sites/528/2018/12/liprofile-656x369.png",
      },
      information: {
        title: "Information",
        description:
          "To manage your bot, go to the <a href='/manage'>Server Management page</a>.<br><br>For a list of commands, go to the <a href='/commands'>Commands page</a>.<br><br><b><i>You can use HTML there</i></b>",
      },
      feeds: {
        title: "Feeds",
        list: [
          {
            icon: "fa fa-user",
            text: "New user registered",
            timeText: "Just now",
            bg: "bg-light-info",
          },
          {
            icon: "fa fa-server",
            text: "Server issues",
            timeText: "3 minutes ago",
            bg: "bg-light-danger",
          },
        ],
      },
    },
    commands: {
      pageTitle: "Commands",
      table: {
        title: "List",
        subTitle: "All Assistants' commands",
        list: [
          {
            commandName: "Test command",
            commandUsage: "prefix.test <arg> [op]",
            commandDescription: "Lorem ipsum dolor sth",
          },
          {
            commandName: "2nd command",
            commandUsage: "oto.nd <arg> <arg2> [op]",
            commandDescription: "Lorem ipsum dolor sth, arg sth arg2 stuff",
          },
        ],
      },
    },
  }),
  settings: [
    {
      categoryId: "guild_settings",
      categoryName: "Settings",
      categoryDescription: "Guild settings",
      categoryOptionsList: [
        {
          optionId: "new_prefix",
          optionName: "Change prefix",
          optionDescription: "Change prefix for your guild",
          optionType: DBD.formTypes.input("New prefix", 1, 5, false, true),
          getActualSet: async ({ guild }) => {
            return getPrefix(guild.id);
          },
          setNew: async ({ guild, newData }) => {
            // currencyNames[guild.id] = newData;
            const newUpdated = updatePrefix(guild.id, newData);
            return;
          },
        },
      ],
    },
  ],
});

Dashboard.init();

Also, I cannot view the official https://assistants.ga/dbd-docs/ website.
image

[IDEA] WebSocket support

I was thinking about adding WebSockets for a project split page for: host, client.

This does not mean anything other than simply being able to have a Dashboard hosted on a different machine than a bot project. The exchange of communication would take place via WebSocket (with authorization to confirm that any user will not connect to the WebSocket).

What do you think about it?

Security

v2 has started but still lacks some essential features. We are about to add more security related to user permissions in v2.

[idea]

Option for More than one table in commands page

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.