peterthehan / create-discord-bot Goto Github PK
View Code? Open in Web Editor NEWA module-based Discord bot template.
License: MIT License
A module-based Discord bot template.
License: MIT License
I think it would be a good idea to add the ability to access the client variable from handlers or commands, so certain commands can display cached data and such.
Hi there, I'm COÐΣ THΣΣÐAL ツᴮᴼᵀ#8126 and I would like to suggest an option or something that makes your commands in categories like Moderation, General, Fun, etc.
bot-name
|---src
|---commands
|--General
|---userinfo
|---serverinfo
|---Fun
|---Memes
|--Kiss
Something like I did up there
Hello. I just found this and was going through the steps and cant seem to get the NPX command to work. It doesn't make the utility nor does it make or edit anything. Am I missing anything or is this outdated?
We installed discord.js in order to login in via the bot token in order to fetch the application ID needed for the invite url.
https://bundlephobia.com/[email protected],[email protected],[email protected],[email protected]
We can trim the dependency bloat due to discord.js by manually fetching the application ID ourselves.
Endpoint doc: https://discord.com/developers/docs/topics/oauth2#get-current-application-information
Endpoint: GET https://discordapp.com/api/oauth2/applications/@me
Add support to have the bot display a status message.
Existing README assumes some technical knowledge of the user and is not layman-friendly. The target audience should be lowered considering the context of the project and/or there should be multiple versions of the README that expands/condenses the information appropriately from which the user can choose from.
Rules pending.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/peterthehan/create-discord-bot.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
https://discord.com/developers/docs/interactions/slash-commands, need to see if usecases are covered.
#20 some good ideas came from this PR. Prettier and nodemon would be nice.
Everytime I do npx peterthehan/create-discord-bot I get this error message:
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/peterthehan/create-discord-bot.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yasse\AppData\Roaming\npm-cache_logs\2021-04-21T20_35_32_703Z-debug.log
While I was working on #65, the git precommit hooks failed because ESLint doesn't know which @typescript-eslint
plugin to use, or more of which .eslintrc.json
file to use. I feel like this is an omen for more obstacles to come, and I think we should do something about it. One solution I can think of is moving the app
folder into another GitHub repo, and having the utility script download that.
Currently, we commit dist
files with compiled Typescript. Typescript has support for static typing using JSDoc comments which can allow us to not have to have any build process. An example of a project using that is SwordCSS.
Intents will be mandatory when discord.js switches from gateway v6 -> v8 and/or Discord kills v6. https://discord.com/developers/docs/topics/gateway#privileged-intents
Simple fix would be to initialize the client enabling all intents https://discord.js.org/#/docs/main/master/class/Intents?scrollTo=s-ALL
Better implementation would be to add a list of necessary intents as a configuration option for each widget so that we're receiving events for only the things each respective widget requires.
Today, we are pushing the compiled code (in dist/
) to the repo so that npx can run this code using the shebang + bin value in package.json. It would be great to instead run the ts code directly with npx so we can stop pushing build files.
Hi there, I'm trying to start the project but an error appeared in the console.
I let the error in the following link -> https://pastebin.com/sLf38GnB
Remove command chunking logic.
Not a QOL dev dependency but just a QOL feature would be to fetch the Client ID of the bot and create an invite link for it.
Originally posted by @shadowtime2000 in #27 (comment)
Dependent on: #22
pm2 work this script in linux ?
Documentation assets (demo gif and diagram png) could be moved under assets/
. For rerecording the demo, several solutions seem to exist that output svg or gif (svg preferred):
Readme refs should be updated.
Currently there is no way to have global dependencies that are only initialized once. I think we should have a deps.js
file which has some global dependencies. It could be like this:
const dbORM = require("db-orm");
const connection = dbOrm("my-connection");
module.exports = {
connection
};
So then only one connection is created which is reused through out the different widgets.
Today, we have code in place to write a .gitignore
file manually instead of just copying from app/
. For some reason fs.copySync
is not copying it correctly. Additionally, other dotfiles like .eslintignore
and .eslintrc.json
seem to copy fine.
You can recreate the issue by commenting out the manual write, pushing to a new branch, and running the script remotely npx <username>/create-discord-bot#<yourbranchname>
.
On my machine today, the npx command takes ~16 seconds and installs 27 packages before loading the prompts. For reference, an older version of the script as seen in the demo gif took ~7 seconds and installed only 7 packages.
Some performance loss is unavoidable as we add features but we should look into speeding this command up.
In an effort to decouple this repo's utility script from the template bot, a new repo was created https://github.com/peterthehan/discord-bot to house the template bot code.
We should delete the files under app/
from this repo, and update the copy/update logic in the utility to fetch the files from the new repo. We should delete the .git/
folder that will result from the clone.
Note: may get #53 for free
how i can stop the bot???
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.