Git Product home page Git Product logo

discord-easy-dashboard's Introduction

Hi there 👋

I'm Simon, a french student with a passion for computers and new technologies! Kind of like the guy in Cloudy with a chance of Meatballs, I spend my days imagining and developing systems to make the world a better place!

Want to support me? -> 🍺 Buy me a coffee beer


  • 🔭 I worked on discord-starboards, a complete framework to facilitate the creation of starboards using discord.js
  • 🌱 I’m comfortable with Node.JS, TypeScript, Python, React, etc
  • 🤔 I’m looking for help with discord-starboards, feel free to make a pull request if you can help me maintain it
  • 📫 How to reach me: You can contact me by mail
  • ⚡ Fun fact: I am a fervent defender of textmojis haha ;) :) :/ -_- ¯\_(ツ)_/¯, I play guitar and drink only sparkling water ✨


🎲 This readme is also a real-time multiplayer trivia game! Try to answer the following question by clicking on the answer you think is correct!

🛠️ How does it work? Each answer is a link to a pre-filled issue. When you press "Submit new issue", it triggers a Github action workflow that compares your answer with the correct answer, finds a new question and updates the readme.md file. Not bad huh?! This whole process only takes about 20 seconds!

Who was the most followed personality on the Instagram network in 2017 ?


Neymar Selena Gomez Leonardo DiCaprio Beyoncé

📒 Last 10 responses :
  • SimonLeclere answered Fiona to Who was placed in a glass coffin by dwarves and then awakened by a prince ? (Wrong answer)
  • SimonLeclere answered 40 liters to How many liters of water can a horse drink each day ? (Good answer)
  • SimonLeclere answered Radio Station to To which other object can we associate the paleophone invented by Charles Cross ? (Wrong answer)
  • SimonLeclere answered To refresh to Why do polar bears lie in the snow when they run ? (Good answer)
  • SimonLeclere answered Minister to Jeanne Chauvin was the first woman in France to practice what profession ? (Wrong answer)
  • SimonLeclere answered Microsoft to Which company injected significant cash to support OpenSSH ? (Good answer)
  • SimonLeclere answered Billie to Which singer nicknamed Lady Day represents American jazz ? (Good answer)
  • SimonLeclere answered Beetle to Which honey bee is the product of the hatching of an unfertilized egg ? (Wrong answer)
  • NotFubukIl answered Meringue to Which pastry shop is attributed to the Italian confectioner Gasparini ? (Good answer)
  • NotFubukIl answered Elektra to Which Daredevil heroine is a professional killer ? (Good answer)

📊 Leaderboard :

User Number of wins
MRakox 51
earock 35
azgar44 33
SimonLeclere 24
janast1975 23
NotFubukIl 16
shadeoxide 15
lowlighter 9
Mr-KayJayDee 8
HideakiAtsuyo 8

Click here to see your stats

discord-easy-dashboard's People

Contributors

azgaresncf avatar cestef avatar simonleclere avatar srs-leazy0310 avatar warre333 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

Watchers

 avatar  avatar

discord-easy-dashboard's Issues

TODO

  • requiring theme from a file instead of just specifying a path
  • requiredPermissions option
  • storing cookies
  • injectHTML option (#14 )

on ready does nothing

this code below seems to do nothing at all for some reason

client.dashboard.on('ready', () => {
	console.log(`Dashboard launched on port ${client.dashboard.config.port} - ${client.dashboard.config.baseUrl}${client.dashboard.config.port === 80 ? '' : ':' + client.dashboard.config.port}`);
});

Examples for databases

Yo, can you please tell us how to use databases in your package such as mongodb enmap, would be very nice

Secret as String

Hey, can I put the secret as a string or does it need to be in a .env?

Color Picker Input

it would be pretty cool and swag if there was the ability to add a color picker in the webpage, so ppl could use it to choose, for example, the embed color

Feature Request

  • Modals (for things like an Embed Creator, they'd have similar options to a plain settings page)
  • Settings Categories (specification of categories for settings, so things can be separated into smaller chunks)
  • Theme Directory (In scrolling through the issues I found one theme that wasn't listed elsewhere, a directory would help users find new themes)

suggestion. Invite link settings

Add an invite link like there is one for the discord server one
why?
Cause people sometimes need it to be with slash commands and thats a different link from admin perms so why not make it just like the server one where you just put the link in the settings

manager ne présente rien

Bonjour. découvrant votre Package, j'ai voulu appliquer votre exemple pour les préfixs, mais rien n'apparait sur la page de management du bot, peu importe le serveur.

client.prefixes = JSON.parse(fs.readFileSync('./data/config/prefixes.json'))

const validatePrefix = prefix => prefix.length <= 5;guild, value) => discordClient.prefixes[guild.id] = value; 

const getPrefix = (discordClient, guild) => discordClient.prefixes[guild.id] || '!'; 

client.dashboard.addTextInput('Prefix', 'The prefix that is added to discord messages in order to invoke commands.', validatePrefix, setPrefix, getPrefix);

je ne sais pas si ce soucis viens de votre package ou autre. Auriez vous une solution ?

Auth not working

the auth is returning error -

FetchError: invalid json response body at http://discordapp.com/api/users/@me reason: Unexpected token < in JSON at position 0
at /home/runner/nuke-protector/node_modules/node-fetch/lib/index.js:273:32
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /home/runner/nuke-protector/node_modules/discord-easy-dashboard/routes/auth.js:45:34 {
type: 'invalid-json'
}

TypeError: Cannot read properties of undefined (reading 'has')

when I try to go into a guild to change settings, I get this error:

if (!member || !member.permissions.has("MANAGE_GUILD")) return res.redirect("/selector");
                                               ^

TypeError: Cannot read properties of undefined (reading 'has')

how do I resolve this?

Add a 404 page

When the used URL is not valid one sends the client to a 404 page. The 404 page should have a GO BACK button and the same navbar and footer from the earlier pages.

Feature request

Since we can use injectCSS when creating the dashboard client, it would be cool to injectHTML too so we can use custom tags.

Favicon

It would be nice if you could please add an option to add a favicon (the lil icon next to the website title)

How to install SSL certs

I have my dashboard running in a Jail on my TrueNAS serer, everything works and cloudflare is routing my domain to my IP, however browsers don't like my site because I have no SSL certs. I have now got certs from lets encrypt, but I don't know how to make discord-easy-dashboard use them. Thanks for any help!

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string.

node:internal/validators:120
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:120:11)
    at join (node:path:1172:7)
    at Dashboard._getTheme (/mnt/500GB/.gitlabs/DiscordBot/node_modules/discord-easy-dashboard/index.)
    at new Dashboard (/mnt/500GB/.gitlabs/DiscordBot/node_modules/discord-easy-dashboard/index.js:48:)
    at Object.<anonymous> (/mnt/500GB/.gitlabs/DiscordBot/Structures/index.js:22:19)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Cannot read properties of undefined (reading 'has')

TypeError: Cannot read properties of undefined (reading 'has')
    at C:\Program Files\nodejs\myBot\node_modules\discord-easy-dashboard\routes\manage.js:11:38
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Promise {
  <rejected> TypeError: Cannot read properties of undefined (reading 'has')
      at C:\Program Files\nodejs\myBot\node_modules\discord-easy-dashboard\routes\manage.js:11:38
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}

Custom HTML & CSS

Hey, just a quick question.

Is it possible to add custom HTML and CSS?

no public files

hey is there no way to add public files to this dashboard? if so where do they go?

Suggestions And More

Suggestions

  • themeColor: 'hex color'; Option to change main theme color on website
  • background: 'image url'; Option to customize background image of main website
  • darkToggle: true; Option for having a switch button on the website to toggle light and dark mode
  • Add some animations to make the website more responsive and beautiful
  • The dropdown menus should have an optional feature for a "None" option

Feature Request

Hi, sorry to bother you again! After you helped me fix the other problem I have since uploaded it to Heroku, is there any way to allow for the faviconPath to allow for URLs?
Thanks!

Cannot Read Property 'name'

So im trying to use your package here is the code

const discord = require('discord.js')
const intents = new discord.Intents(32767)
const client = new discord.Client({intents})
const Dashboard = require('discord-easy-dashboard')

const dashboard = new Dashboard(client)

client.dashboard = dashboard

client.login(MyToken)

and here is the error

C:\Users\ocean\Documents\test-dashboard\node_modules\discord-easy-dashboard\index.js:19
name: options.name || client.user.username || null,
^

TypeError: Cannot read property 'name' of undefined
at new Dashboard (C:\Users\ocean\Documents\test-dashboard\node_modules\discord-easy-dashboard\index.js:19:18)
at Object. (C:\Users\ocean\Documents\test-dashboard\index.js:6:19)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47

Guild ID showing as undefined

I use mySQL in order to handle the settings within my bot but for some reason the guild ID when getting settings from the dashboard is only ever showing as undefined or as "null" within the actual database file.

Here is the code for one of the functions to change a setting as an example of my code

const setxpEnable = (guild, value) => {

	let guildset = client.getGuSett.get(guild.id)

	if(value === true) {
		guildset = { guildID: guild.id, enableLogging: guildset.enableLogging, enableWelcome: guildset.enableWelcome, enableXP: 'true', enableRoleOnJoin: guildset.enableRoleOnJoin, enableBoosts: guildset.enableBoosts, enableLeave: guildset.enableLeave };
        client.setGuSett.run(guildset);
	}

	if(value === false) {
		guildset = { guildID: guild.id, enableLogging: guildset.enableLogging, enableWelcome: guildset.enableWelcome, enableXP: 'false', enableRoleOnJoin: guildset.enableRoleOnJoin, enableBoosts: guildset.enableBoosts, enableLeave: guildset.enableLeave };
        client.setGuSett.run(guildset);
	}
}

When outputting the guild id using console.log(guild.id) it always comes out as undefined.

I'm assuming it's being formatted as an object instead of a string, snowflake or the like but I would like some clarification.

redirect uri going back to authorization page

Hey, I recently made some changes to the dashboard, and I changed the bot from an old one to a new one. I changed the token and the secret. now when I log in I got to the correct login page with the correct bot, and when I log in I get sent back to the login page.
the code and developer portal redirect URI is: https://tbtda.xyz/auth/login

nothing has really changed from before. discord should send me back to https://tbtda.xyz

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.