{"id":20084697,"url":"https://github.com/flloschy/tempbot","last_synced_at":"2025-05-06T01:32:16.193Z","repository":{"id":159917492,"uuid":"540534845","full_name":"flloschy/tempbot","owner":"flloschy","description":"An easy to setup Template discord bot","archived":true,"fork":false,"pushed_at":"2022-10-14T20:49:11.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T14:23:51.320Z","etag":null,"topics":["bot","discord-bot","discord-command-handler","discord-js","discord-js-v14","template","template-bot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flloschy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-23T16:49:34.000Z","updated_at":"2023-06-21T19:15:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"af0343e5-3dd2-4942-83ff-5b83e0372949","html_url":"https://github.com/flloschy/tempbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flloschy%2Ftempbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flloschy%2Ftempbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flloschy%2Ftempbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flloschy%2Ftempbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flloschy","download_url":"https://codeload.github.com/flloschy/tempbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252604421,"owners_count":21775098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord-bot","discord-command-handler","discord-js","discord-js-v14","template","template-bot"],"created_at":"2024-11-13T15:52:56.568Z","updated_at":"2025-05-06T01:32:16.178Z","avatar_url":"https://github.com/flloschy.png","language":"JavaScript","readme":"# Template bot\r\n___\r\n\r\nA little template discord bot made with [discord.js](https://discordjs.dev)(v14)\r\n\r\n___\r\n\r\n## Features\r\n- [x] Automated command registration\r\n- [x] Easy command creator\r\n- [x] commandhandler without any actions needed\r\n- [x] log system\r\n- [x] other (command) options besides String\r\n- [ ] on install avaliable tools\r\n   - [x] embed creator\r\n   - [ ] more to come\r\n- [x] Text only commands\r\n- [x] automated help command\r\n- [ ] handling of...\r\n   - [x] ... buttons\r\n   - [ ] ... menues\r\n   - [ ] ... models\r\n   - [ ] ... \r\n- [ ] cooldowns\r\n- [ ] automated restart\r\n\r\n___\r\n\r\n## Setup\r\n\r\n1 - Install dependencies with `npm i`. \\\r\n2 - Create a file called `.env` and add your token to it like this: `TOKEN=yourtoken`, you also need to add the bots id `USERID=botid` and the server the bot will be active in `SERVERID=serverid`. \\\r\n3 - Try if the bot runs `npm run bot`. \\\r\n4 - If the bot runs, you can start coding. \r\n\r\n___\r\n\r\n## Log system\r\n\r\nEverything gets locked into a logfile. By default the log file is [`./logs/tempbot\u003cdate\u003e.log`](https://github.com/flloschy/tempbot/tree/main/logs). \\\r\nYou can choose 4 log levels, which should get logged these are `fatal (=4), error (=3), debug (=2), info (=1)`. \\\r\nYou can change this in the [`config.js`](https://github.com/flloschy/tempbot/blob/main/config.js) file. \\\r\nThere you can activate each log level individual, just by changing the boolean in the config at `log -\u003e log -\u003e [1-4]`. \\\r\nAlso, you can activate console logging and deactivate file logging by clearing the string. *There will be an error when no console and file logging are activated, but the bot will continue running.*\r\n___\r\n\r\n## Creating commands\r\n\r\nThe system is build modular, so you dont need to do any handling or registering. \\\r\nYou can find an Example command in the [`./src/commands/-example`](https://github.com/flloschy/tempbot/tree/main/src/commands/-example) folder. \\\r\n*Put a `-`(minus) before the folder name to disable the command* \\\r\nAs you can see there is a `manager.js` and two folder called `groups` and `subcommands`. \\\r\nThe only thing you need to do is to change the `shortdescription` and `longdescription` to your desire in the `manager.js` file. (the command name will be the foldername) \r\n\r\n#### Basic text command\r\nYou can create text based commands, they cant take any arguments and only return a set embed!\r\n- To create such a command just go into the `config.js` under `textCommands`.\r\n- Create a new dict and give it a `name`, `description` and `return` tag! *All of them are required!*\r\n- In the return tag you NEED to add an `title` and `description`\r\n   - if you want you can also add `fields`, but they are not needed.\r\n- If you dont want any text commands, just clear the `textCommands` array. *dont remove it*\r\n\r\n#### Command options\r\n*Please note that you can only add options if you dont have any subcommands or groups* \\\r\n*well... you can have subcommands and groups, but they get preffered over the command itself*\r\n- Create a folder called `command`\r\n- Create a file called `index.js` \\\r\n*If you need any extra files for the command in there, you can but index is the file thats gets called on an interaction*\r\n- Add options in the args array in the manager file\r\n- Done\r\n\r\n#### Subcommand\r\n- Further on you can easily add subcommands by coping the example `ping.js` from the `subcommand` folder. \\\r\n*Please note that the file name will be the command name*\r\n- When this is done you only need to change once again the `short-` and  `long-description` to your liking.\r\n- If needed you can add options to your command, the only thing to do is creating a dictionary in the `args` array. \\\r\n*Please note that at the moment all Input types work, but only Int, Num and String Value limits are supported*\r\n- Congrats! You have created a new command, now the coding can begin in the `execute` function. \r\n\r\n#### Groups and Subcommands\r\n- If you want to create a group, you need to create a folder in the `groups` folder and name it like the group. \\\r\n*Please note that the folder name will be the group name*\r\n- After that you can create a subcommand in the newly created goupfolder. \\\r\n*Please note that the file name will be the command name*\r\n- From here on you can do the same steps as with the normal [subcommands](https://github.com/flloschy/tempbot#subcommand).\r\n\r\n*If you want to remove a command, you can just delete the command folder and it will be removed*\r\n\r\n___\r\n\r\n## File structure\r\n\r\nHere is a litte overview of the file structure used for commands\r\n\r\n```py\r\nTemplatebot\r\n└─ src\r\n   └─ commands #create folder here for new command\r\n      └─ example #command name\r\n         ├─ manager.js #command handler\r\n         ├─ command #command folder\r\n         │  └─ index.js #command file\r\n         ├─ subcommands\r\n         │  └─ examplesub.js #subcommand name\r\n         └─ groups\r\n            ├─ examplegroup1 #group name\r\n            │  ├─ examplesub1.js #subcommand name\r\n            │  └─ examplesub1.js  \r\n            └─ examplegroup2       \r\n               ├─ examplesub1.js\r\n               └─ examplesub2.js\r\n```\r\n___\r\n\r\n## Tools\r\nWith the install of this bot you have some ready to good tools on your hand! \\\r\nThose are little things which help you to have an consistant design across all your commands. \\\r\nAll the pre-installed tolls can be found there: `src/functions/base/tools.js`\r\n\r\n#### baseEmbed\r\nThis is a little tool which only adds color, author and footer to an embed which gets returned.\r\n\r\nIt needs the interaction and a color, the color can be a string which is pre determand in the config at `baseEmbed -\u003e colors`, you can also add your template colors!\r\n\r\nYou can give nothing and the color will be the display color of the bot. If you give an hexcode as color this will be used.\r\n\r\nThe author can be configured in the config at `baseEmbed -\u003e author`, there you can disable the author field, edit the text, edit the url and icon. The footer will always say `Requested by \u003cuser\u003e` and the timestamp of the creation of the interaction.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflloschy%2Ftempbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflloschy%2Ftempbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflloschy%2Ftempbot/lists"}