Compare commits

...
274 Commits
Author SHA1 Message Date
ItzEmerald ddc8bcab9b Pre-2 2021-08-05 13:40:19 +01:00
ItzEmerald 35dacfd48a Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-08-05 13:39:48 +01:00
ItzEmerald 611cef34ab 7.1-Pre-2 2021-08-05 13:39:44 +01:00
Xiled Emerald 8a8f9fe890 Update SupportTickets.json 2021-08-05 01:07:16 +01:00
Xiled Emerald 5a65b70c80 Update ticketreaction.yml 2021-08-05 01:07:04 +01:00
Xiled Emerald 8bea3faa1f Update TicketID.json 2021-08-05 01:06:53 +01:00
ItzEmerald 4125954d53 7.1 Pre-1
Revamp of ticket system
2021-08-05 01:03:58 +01:00
Xiled Emerald 3d9c5a729e Create SupportBot_ENG.yml 2021-08-01 16:21:47 +01:00
Xiled Emerald 51d775ea6d Delete supportbot-config_GER.yml 2021-08-01 16:20:25 +01:00
Xiled Emerald e461c47c4b Delete supportbot-config_FR.yml 2021-08-01 16:20:19 +01:00
Xiled Emerald bbdb38e45a Delete supportbot-config_ES.yml 2021-07-31 15:33:37 +01:00
Xiled Emerald 083e047aec Delete supportbot-config_ENG.yml 2021-07-31 15:33:30 +01:00
Xiled Emerald 84e0b504ab Delete .DS_Store 2021-06-30 21:33:35 +01:00
Xiled Emerald bedff6832c Update supportbot-config.yml 2021-06-30 21:33:16 +01:00
ItzEmerald 6c29e04de2 7.0 2021-06-30 21:30:41 +01:00
ItzEmerald ba674323e1 Update help.js 2021-06-15 21:05:38 +01:00
ItzEmerald 6d756a161e Update help.js 2021-06-15 21:04:32 +01:00
ItzEmerald 66a5cd95ec Update README.md 2021-06-15 19:56:39 +01:00
ItzEmerald 9f70648264 Update suggest.js 2021-06-15 19:10:17 +01:00
ItzEmerald b975b79691 Update removeUser.js 2021-06-15 19:10:07 +01:00
ItzEmerald 3cab896954 Update purge.js 2021-06-15 19:09:58 +01:00
ItzEmerald b9680e5b35 Update ping.js 2021-06-15 19:09:46 +01:00
ItzEmerald 43a003ca7d Update newticket.js 2021-06-15 19:09:35 +01:00
ItzEmerald fbe1cf2009 Update links.js 2021-06-15 19:09:23 +01:00
ItzEmerald fdee61cc11 Update kick.js 2021-06-15 19:09:06 +01:00
ItzEmerald 8b51200d9c Update help.js 2021-06-15 19:08:56 +01:00
ItzEmerald 0631ab536a Update close.js 2021-06-15 19:08:46 +01:00
ItzEmerald 0d76e76519 Update botSay.js 2021-06-15 19:07:42 +01:00
ItzEmerald 9e9f83d211 Update blacklistUser.js 2021-06-15 19:07:26 +01:00
ItzEmerald 0829d477d9 Update ban.js 2021-06-15 19:07:10 +01:00
ItzEmerald 1b7109fa23 Update announce.js 2021-06-15 19:06:58 +01:00
ItzEmerald 366669ccd8 Update addUser.js 2021-06-15 19:06:40 +01:00
ItzEmerald e05edd89fa Update ready.js 2021-06-15 18:09:24 +01:00
ItzEmerald a405df66c9 Update message.js 2021-06-15 18:09:06 +01:00
ItzEmerald 28a57ead9f Update index.js 2021-06-15 18:08:32 +01:00
ItzEmerald 72bfacae75 Merge pull request #68 from DuAnti7423/master
Boolean Changes, help menu fix, raw Event, ID Support added
2021-05-24 12:48:25 +01:00
DuAnti7423 10f8821b3b Random Stuff
idk why github thinks i changed something
2021-05-23 10:45:00 +02:00
DuAnti7423 92a3745ce1 Update supportbot-config.yml
Added HelpMenu_WithKey Option.
Boolean Changes
2021-05-23 10:44:00 +02:00
DuAnti7423 aff7ff1451 Update ready.js
ID Support, Boolean Changes
2021-05-23 10:41:15 +02:00
DuAnti7423 9e63e0ff09 Create raw.js
Added Raw-Event, probably fixxed the ticketreaction isnt 100% workin
2021-05-23 10:41:05 +02:00
DuAnti7423 2c5ebd8620 Update messageReactionAdd.js
ID Support, Boolean Changes
2021-05-23 10:40:37 +02:00
DuAnti7423 e6d63db3a9 Update guildMemberRemove.js
ID Support, Boolean Changes
2021-05-23 10:40:32 +02:00
DuAnti7423 2cc316aafb Update guildMemberAdd.js
ID Support, Boolean Changes
2021-05-23 10:40:28 +02:00
DuAnti7423 4f25cfa0dd Update suggest.js
ID Support, Boolean Changes
2021-05-23 10:40:20 +02:00
DuAnti7423 0385de3882 Update removeUser.js
ID Support, Boolean Changes
2021-05-23 10:40:16 +02:00
DuAnti7423 2e1253c54e Update purge.js
ID Support, Boolean Changes
2021-05-23 10:40:10 +02:00
DuAnti7423 14df15caeb Update ping.js
ID Support, Boolean Changes
2021-05-23 10:40:03 +02:00
DuAnti7423 af481a2ec8 Update newticket.js
ID Support, Boolean Changes

Fixxed everyone permissions on ticket creation
2021-05-23 10:39:58 +02:00
DuAnti7423 96c1d80844 Update links.js
ID Support, Boolean Changes
2021-05-23 10:39:42 +02:00
DuAnti7423 57ea2e25bd Update kick.js
ID Support, Boolean Changes
2021-05-23 10:39:36 +02:00
DuAnti7423 cd17b0a6d7 Update help.js
ID Support, Boolean Changes
2021-05-23 10:39:31 +02:00
DuAnti7423 c5dd8823f6 Update close.js
ID Support, Boolean Changes
2021-05-23 10:39:24 +02:00
DuAnti7423 c27f16f753 Update botSay.js
ID Support, Boolean Changes
2021-05-23 10:39:18 +02:00
DuAnti7423 4842610229 Update blacklistUser.js
ID Support, Boolean Changes
2021-05-23 10:39:13 +02:00
DuAnti7423 bd33669dba Update ban.js
ID Support, Boolean Changes
2021-05-23 10:39:08 +02:00
DuAnti7423 e81684d322 Update announce.js
ID Support, Boolean Changes
2021-05-23 10:39:03 +02:00
DuAnti7423 8209dfa26c Update addUser.js
ID Support, Boolean Changes
2021-05-23 10:38:55 +02:00
DuAnti7423 0a82c62a4e boolean changes
workin on suggestion #67  from pat2381
2021-05-22 23:41:39 +02:00
DuAnti7423 4399dfe6b8 Fixxed a copy error
replaced reactionUser with user cause reactionUser was defined in the ticket command
2021-05-22 23:38:32 +02:00
DuAnti7423 defd0cc78c Merge branch 'master' of https://github.com/DuAnti7423/SupportBot 2021-05-22 23:13:25 +02:00
DuAnti7423 fd5fc8294c update help.js
Fixxed a bug with staffcommands show
2021-05-22 23:13:16 +02:00
ItzEmerald 10823b416c Update package.json 2021-05-14 15:46:23 +01:00
ItzEmerald 4490920ac6 Update index.js 2021-05-14 15:46:08 +01:00
ItzEmerald e0b8ad4a32 Update supportbot-config.yml 2021-05-14 15:45:49 +01:00
ItzEmerald e11063832b Merge pull request #65 from DuAnti7423/master
Blacklist Command
2021-05-12 15:35:56 +01:00
DuAnti7423 d598fdd753 updated help.js 2021-05-09 00:25:30 +02:00
DuAnti7423 157b93239a Added Logging to Blacklist 2021-05-08 23:55:57 +02:00
DuAnti7423 3d7058dccd Merge branch 'master' of https://github.com/DuAnti7423/SupportBot 2021-05-08 23:44:12 +02:00
DuAnti7423 1ec654d1ea Blacklist Command
Added Blacklist Command
Added configoption
2021-05-08 23:42:35 +02:00
ItzEmerald 8ce2d4269d Merge pull request #62 from DuAnti7423/master
Blacklist Role
2021-05-07 15:09:46 +01:00
DuAnti7423 49e8aa7869 Blacklist Role
Added Blacklist Role, via ID or Name
2021-04-17 22:15:59 +02:00
ItzEmerald 0827f55d43 Update guildMemberAdd.js 2021-03-31 01:21:34 +01:00
ItzEmerald ba6ff8c342 Update node.js.yml 2021-03-31 00:28:35 +01:00
ItzEmerald c0b7dc2737 Create node.js.yml 2021-03-31 00:27:10 +01:00
ItzEmerald ab6abd453b Delete node_modules directory 2021-03-30 20:20:33 +01:00
ItzEmerald 77921aca75 Update ready.js 2021-03-30 20:18:37 +01:00
ItzEmerald a8f91c4814 Update messageReactionAdd.js 2021-03-30 20:12:29 +01:00
ItzEmerald 7780fa792c Updated 2021-03-27 16:58:27 +00:00
ItzEmerald 41e4c376ec Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-03-27 16:22:37 +00:00
ItzEmerald 09aad61cfe SB-6.3-BETA 2
Added Moderation
Added Node Modules
2021-03-27 16:22:19 +00:00
ItzEmerald 31ac81428f Update ready.js 2021-03-24 20:56:57 +00:00
ItzEmerald 60daab82d2 Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-03-24 16:26:21 +00:00
ItzEmerald e7a0544004 Added Image to ReactionPanel 2021-03-24 16:25:16 +00:00
ItzEmerald ff0364bba8 Update supportbot-config_FR.yml 2021-03-17 16:04:41 +00:00
ItzEmerald a3b64be351 Update supportbot-config_ES.yml 2021-03-17 16:03:52 +00:00
ItzEmerald eae370e346 Update README.md 2021-03-17 14:36:11 +00:00
ItzEmerald 0d86b50a83 Update supportbot-config_ENG.yml 2021-03-17 14:35:45 +00:00
ItzEmerald 543b9028a3 Update supportbot-config_ES.yml 2021-03-17 14:35:15 +00:00
ItzEmerald 867f12d11f Update supportbot-config_FR.yml 2021-03-17 14:33:13 +00:00
ItzEmerald 462781ea6a Update supportbot-config_GER.yml 2021-03-17 14:31:37 +00:00
ItzEmerald c300ab6459 Update supportbot-config.yml 2021-03-11 18:57:27 +00:00
ItzEmerald 448d8f3007 Update ready.js 2021-03-11 18:55:33 +00:00
ItzEmerald faa53b0af1 Create supportbot-config_ENG.yml 2021-03-03 19:42:29 +00:00
ItzEmerald 8e53b8d9a6 Rename supportbot-config_GN.yml to supportbot-config_GER.yml 2021-03-03 19:41:36 +00:00
ItzEmerald 5678567baa Create supportbot-config_GN.yml 2021-03-03 19:37:39 +00:00
ItzEmerald 1c30f73bb1 Create supportbot-config_FR.yml 2021-03-03 18:36:02 +00:00
ItzEmerald bd3dbc3033 Rename supportbot-config.y_ES.yml to supportbot-config_ES.yml 2021-03-03 00:39:41 +00:00
ItzEmerald 3c312ab8d3 Create supportbot-config.y_ES.yml
Spanish
2021-03-03 00:39:20 +00:00
ItzEmerald 7284785db0 Delete eyeroe.md 2021-02-13 16:25:53 +00:00
ItzEmerald 4e543ea490 Update messageReactionAdd.js 2021-02-13 16:25:28 +00:00
ItzEmerald 4d3540126f Update eyeroe.md 2021-02-08 15:34:02 +00:00
ItzEmerald 6c29f0d792 Create eyeroe.md 2021-02-08 15:33:44 +00:00
wxip c85df7c40f Update ready.js 2021-02-05 21:39:16 +02:00
wxip 4f6ff575ce Quick Fix
Hopefully fixes `INVALID_TYPE` error on GuildMemberAdd event.
2021-02-05 21:26:21 +02:00
ItzEmerald aaf3890f71 Update guildMemberAdd.js 2021-02-05 16:15:51 +00:00
ItzEmerald 4f9837d991 Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-02-04 12:54:29 +00:00
ItzEmerald 2e2eb008c6 Language PRE-01 2021-02-04 12:54:19 +00:00
ItzEmerald fa7074bb59 Update messageReactionAdd.js 2021-02-02 17:56:13 +00:00
ItzEmerald 18a7def050 Delete package-lock.json 2021-02-02 17:55:00 +00:00
ItzEmerald 40e9cf5fe5 Update messageReactionAdd.js 2021-02-02 17:52:07 +00:00
ItzEmerald 6ce049a57e Update supportbot-config.yml 2021-02-02 17:26:31 +00:00
ItzEmerald d4c4eac710 Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-02-02 17:15:36 +00:00
ItzEmerald 28ec96e5e8 SB-6.1-PRE 2021-02-02 17:15:24 +00:00
ItzEmerald a20fe8eb06 Update ticketreaction.yml 2021-02-02 17:02:35 +00:00
ItzEmerald 7d1d9b881d Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-02-02 17:02:03 +00:00
ItzEmerald c116e6cbb0 SB-6.1-PRE 2021-02-02 17:01:58 +00:00
ItzEmerald a3ebf0a33b Delete .DS_Store 2021-02-02 16:19:13 +00:00
ItzEmerald ea6ef022e7 Delete .DS_Store 2021-02-02 16:19:02 +00:00
ItzEmerald 683e29196a Update README.md 2021-02-02 16:18:34 +00:00
ItzEmerald 71694d7082 Update README.md 2021-02-02 16:18:14 +00:00
ItzEmerald c5d5656fb6 Update supportbot-config.yml 2021-02-02 16:09:23 +00:00
ItzEmerald b1fdbee5f8 Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2021-02-02 16:08:10 +00:00
ItzEmerald 70405a1cd0 SB-6.1-PRE
Ticket Reaction Create
2021-02-02 16:07:28 +00:00
ItzEmerald 3d7e81169f Delete node_modules directory 2021-02-02 15:54:24 +00:00
ItzEmerald fa7c8c7219 Update supportbot-config.yml 2021-02-02 13:51:48 +00:00
ItzEmerald 358a25f522 SB-6.1-PRE 2021-02-02 13:50:53 +00:00
ItzEmerald 690169a409 Update LICENSE 2021-02-02 09:44:58 +00:00
ItzEmerald 0ec4cc5a51 Merge pull request #49 from 1tzemerald/add-license-1
Create LICENSE
2021-02-02 00:27:27 +00:00
ItzEmerald 0b7dbaf368 Create LICENSE 2021-02-02 00:27:04 +00:00
ItzEmerald 940c445182 Delete LICENSE 2021-02-01 23:19:47 +00:00
ItzEmerald d8a90c9aa5 Update LICENSE 2021-01-28 14:41:17 +00:00
ItzEmerald 89ee8fceca Merge pull request #47 from 1tzemerald/SupportBot
Support bot
2020-12-30 18:59:41 +00:00
ItzEmerald 68b55a2d33 Delete jo 2020-12-30 18:59:23 +00:00
ItzEmerald 8cc2e7747f Delete supportbot-crowdin.yml 2020-12-30 18:59:11 +00:00
ItzEmerald 4e6ac3a294 Update Crowdin configuration file 2020-12-30 18:57:19 +00:00
ItzEmerald 732e22ea7b Create jo 2020-12-30 18:55:57 +00:00
ItzEmerald ac0d9981f8 Delete supportbot-crowdin.yml 2020-12-30 18:49:11 +00:00
ItzEmerald 23f7310760 Create supportbot-crowdin.yml 2020-12-30 18:48:56 +00:00
ItzEmerald 02a9ce6bac Update messageReactionAdd.js 2020-12-24 16:35:33 +00:00
ItzEmerald 069665358f Update README.md 2020-12-24 15:32:42 +00:00
ItzEmerald 2cf6d69127 Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2020-12-24 15:19:50 +00:00
ItzEmerald 870435061d Updated 2020-12-24 15:19:02 +00:00
Kieran Davies 53ad906491 Create .gitignore 2020-12-18 14:26:16 +00:00
Kieran Davies 01399e343b Update messageReactionAdd.js 2020-12-18 13:59:36 +00:00
Kieran Davies a0bdec4c42 Update messageReactionAdd.js 2020-12-18 13:51:51 +00:00
Kieran Davies 914f2057d8 Update messageReactionAdd.js 2020-12-18 13:51:03 +00:00
Kieran Davies ed9b9dca79 Update messageReactionAdd.js 2020-12-18 13:46:16 +00:00
ItzEmerald f6d4383ff6 6.1 PRE-0.2 2020-12-18 13:37:56 +00:00
ItzEmerald b6ccf30ae4 Update supportbot-config.yml 2020-12-11 22:12:21 +00:00
ItzEmerald 48e44a0d38 Update supportbot-config.yml 2020-12-11 22:12:02 +00:00
ItzEmerald 735998b48c Delete messageReactionRemove.js 2020-12-11 22:11:25 +00:00
ItzEmerald d94eefddb7 Delete messageReactionAdd.js 2020-12-11 22:11:07 +00:00
ItzEmerald 5a65b4df17 Update ready.js 2020-12-11 21:45:10 +00:00
ItzEmerald 15a839a310 Update message.js 2020-12-11 21:44:56 +00:00
ItzEmerald 9730c61962 Update guildMemberRemove.js 2020-12-11 21:44:31 +00:00
ItzEmerald 1805c041a6 Update guildMemberRemove.js 2020-12-11 21:44:20 +00:00
ItzEmerald f0bde93d5f Update guildMemberAdd.js 2020-12-11 21:43:58 +00:00
ItzEmerald 1ed7412f92 Update index.js 2020-12-11 21:43:36 +00:00
ItzEmerald 1f5ea2d25b Update suggest.js 2020-12-11 21:42:34 +00:00
ItzEmerald ff4c8f0e85 Update removeUser.js 2020-12-11 21:42:20 +00:00
ItzEmerald 5c3dd878b8 Update ping.js 2020-12-11 21:42:04 +00:00
ItzEmerald 20f0d91c75 Update newticket.js 2020-12-11 21:41:36 +00:00
ItzEmerald 894e48756f Update links.js 2020-12-11 21:41:13 +00:00
ItzEmerald aef199b292 Update help.js 2020-12-11 21:39:23 +00:00
ItzEmerald 9b884cd941 Update close.js 2020-12-11 21:39:09 +00:00
ItzEmerald b22d813cee Update botSay.js 2020-12-11 21:38:45 +00:00
ItzEmerald 0981566cbe Update announce.js 2020-12-11 21:38:31 +00:00
ItzEmerald 0647aa435a Update addUser.js 2020-12-11 21:38:13 +00:00
ItzEmerald 58179f98e9 Update index.js 2020-12-11 13:45:00 +00:00
ItzEmerald 05fe62536b Update supportbot-config.yml 2020-12-11 13:44:46 +00:00
ItzEmerald 241d41e220 Update supportbot-config.yml 2020-12-11 13:43:53 +00:00
ItzEmerald 34d6134c24 Update supportbot-config.yml 2020-12-11 13:43:17 +00:00
ItzEmerald 702d1d1998 Add files via upload 2020-12-11 13:42:27 +00:00
ItzEmerald e43a5fd5a3 Delete unhandledRejection.js 2020-12-10 11:34:01 +00:00
ItzEmerald 4ed9a7b7f5 Create README.md 2020-12-10 11:33:38 +00:00
ItzEmerald d8ba76e395 Delete README.md 2020-12-10 11:32:00 +00:00
ItzEmerald 448004abca Delete SUMMARY.md 2020-12-10 11:31:50 +00:00
ItzEmerald 7b0db34fb1 Delete image.png 2020-12-10 11:30:46 +00:00
ItzEmerald a7e7d5b372 Delete mit-license.md 2020-12-10 11:30:19 +00:00
ItzEmerald 9768628e8b Delete terms-and-conditions.md 2020-12-10 11:30:10 +00:00
ItzEmerald 6c0328b2fd Delete README.md 2020-12-09 11:11:59 +00:00
ItzEmerald 6bf7d879e2 Delete hosting-provider.md 2020-12-09 11:11:50 +00:00
ItzEmerald f25490f1ad Delete ubuntu-installation.md 2020-12-09 11:11:43 +00:00
ItzEmerald 31eee78535 Delete README.md 2020-12-09 11:11:30 +00:00
ItzEmerald 4ed2aff1b7 Create unhandledRejection.js 2020-12-09 11:10:06 +00:00
ItzEmerald 6f05545be6 Delete changelog.md 2020-12-09 11:06:55 +00:00
ItzEmerald dfec8a0e4f Delete download.md 2020-12-09 11:06:33 +00:00
ItzEmerald 47b730111b Delete untitled.md 2020-12-09 11:06:26 +00:00
ItzEmerald 59ba27c36f Delete creating-your-own-addon.md 2020-12-09 11:06:17 +00:00
ItzEmerald b501164c38 Delete README.md 2020-12-09 11:06:08 +00:00
Itz Emerald 1b795087bf GitBook: [master] one page modified 2020-12-07 15:50:30 +00:00
Itz Emerald 7063edc10f GitBook: [master] one page modified 2020-12-07 15:50:11 +00:00
Itz Emerald c02abcb760 GitBook: [master] one page modified 2020-12-07 15:48:42 +00:00
Itz Emerald 2d1a20dcc6 GitBook: [master] one page modified 2020-12-07 15:48:27 +00:00
Itz Emerald 65156d4b20 GitBook: [master] 14 pages and one asset modified 2020-11-28 20:03:35 +00:00
ItzEmerald 951cedb190 Update LICENSE 2020-09-27 01:18:01 +01:00
ItzEmerald 11442f320d Update index.js 2020-09-27 01:14:37 +01:00
ItzEmerald 33df21f656 Update supportbot-config.yml 2020-09-27 01:13:56 +01:00
ItzEmerald 19ab208678 Merge pull request #40 from real2two/patch-1
Add "Delete Messages" options on the configuration file.
2020-09-27 01:06:29 +01:00
ItzEmerald 59b9651575 Merge pull request #42 from real2two/patch-3
Fix prefix on playing status.
2020-09-27 01:06:06 +01:00
ItzEmerald c1c1f1767a Merge pull request #44 from 1tzemerald/dependabot/npm_and_yarn/node-fetch-2.6.1
Bump node-fetch from 2.6.0 to 2.6.1
2020-09-27 01:05:42 +01:00
dependabot[bot] dda8a5180c Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-27 00:04:16 +00:00
ItzEmerald 34d558412f Update package.json 2020-09-27 01:02:51 +01:00
ItzEmerald be77ee1903 Update newticket.js 2020-09-27 01:00:54 +01:00
ItzEmerald fc571d6c73 Update README.md 2020-09-09 14:04:46 +01:00
Two 7ca5a97535 Update supportbot-config.yml 2020-08-02 10:25:12 -04:00
ItzEmerald 730239ba8d Merge branch 'master' of https://github.com/1tzemerald/SupportBot 2020-08-02 13:53:17 +01:00
ItzEmerald 9069e23188 GuildMemberRemove Fix 2020-08-02 13:53:14 +01:00
Two 366203fe21 Update addon-example.js 2020-07-27 10:45:25 -04:00
Two f23f15c972 Update announce.js 2020-07-27 10:44:06 -04:00
Two 8432290a70 Update botSay.js 2020-07-27 10:43:59 -04:00
Two ceddd503f8 Update close.js 2020-07-27 10:43:51 -04:00
Two 51ad35f72b Update help.js 2020-07-27 10:43:45 -04:00
Two 5631b24a14 Update links.js 2020-07-27 10:43:36 -04:00
Two f9da25643d Update newticket.js 2020-07-27 10:43:30 -04:00
Two 75bed3f5dd Update ping.js 2020-07-27 10:43:25 -04:00
Two d4576dfc21 Update removeUser.js 2020-07-27 10:43:17 -04:00
Two 31bad3c2e5 Update suggest.js 2020-07-27 10:43:11 -04:00
Two a3c0e81e04 Update addUser.js 2020-07-27 10:42:53 -04:00
Two b5cf721efb Update supportbot-config.yml 2020-07-27 10:42:39 -04:00
Two 95063398aa Update message.js 2020-07-27 10:39:25 -04:00
ItzEmerald 2da25c5566 Update README.md 2020-07-26 12:57:08 +01:00
ItzEmerald a72c1ab380 Merge pull request #39 from 1tzemerald/SupportBot-6.0
Support bot 6.0
2020-07-23 20:20:32 +01:00
ItzEmerald 87b9301e20 Update help.js 2020-07-23 20:16:32 +01:00
ItzEmerald d0a6bed727 Delete BotSay.js 2020-07-23 17:40:31 +01:00
ItzEmerald 29881fbf28 Merge branch 'SupportBot-6.0' of https://github.com/1tzemerald/SupportBot into SupportBot-6.0 2020-07-15 18:42:13 +01:00
ItzEmerald 4f05ad6546 SupportBot 6.0 BETA 1 2020-07-15 18:42:07 +01:00
doge 36fc9aae6c Update removeUser.js 2020-07-15 12:05:39 -04:00
doge fb3f87c685 Update addUser.js 2020-07-15 12:05:24 -04:00
doge a4c0eeb9b3 Update addUser.js 2020-07-15 11:57:32 -04:00
doge c64f249fd0 Update removeUser.js 2020-07-15 11:57:14 -04:00
doge 48b542293f Update addUser.js 2020-07-15 11:56:52 -04:00
doge 95e92970c9 Update removeUser.js 2020-07-15 11:44:17 -04:00
doge afdb16da07 Update addUser.js 2020-07-15 11:44:01 -04:00
doge 0a230cfab9 fix remove 2020-07-15 11:37:58 -04:00
doge c752a07ad0 fix adduser 2020-07-15 11:37:17 -04:00
ItzEmerald cc5a6b7317 Update BotSay.js 2020-07-15 02:20:05 +01:00
ItzEmerald d93991ad86 Merge branch 'SupportBot-6.0' of https://github.com/1tzemerald/SupportBot into SupportBot-6.0 2020-07-15 02:20:03 +01:00
ItzEmerald 5c98376a8c RolePerms Update 2020-07-15 02:16:15 +01:00
ItzEmerald 28699f0ff0 Updated 2020-07-14 19:42:46 +01:00
ItzEmerald e3576b17b1 Updated 2020-07-14 19:17:40 +01:00
ItzEmerald 17c49b2b03 Merge branch 'SupportBot-6.0' of https://github.com/1tzemerald/SupportBot into SupportBot-6.0 2020-07-11 13:19:19 +01:00
ItzEmerald dcc00d8d1f Update 2020-07-11 13:17:57 +01:00
ItzEmerald 05a772eee2 Create removeUser.js 2020-07-10 20:56:40 +01:00
ItzEmerald 59dd291dc6 Update addUser.js 2020-07-10 20:55:02 +01:00
ItzEmerald f0a791e354 Update README.md 2020-07-10 20:48:41 +01:00
ItzEmerald 94db6cff7b Create addUser.js 2020-07-10 18:55:03 +01:00
ItzEmerald 72a02bf6d2 Close.js updated 2020-07-04 00:54:34 +01:00
ItzEmerald cf99209887 Close Ticket 2020-06-24 09:50:14 +01:00
ItzEmerald ff7ed49905 guildMemberRemove added 2020-06-21 15:56:16 +01:00
ItzEmerald ecd17a51df guildMemberAdd Updated 2020-06-21 12:36:48 +01:00
ItzEmerald 63b08f8c12 guildMemberAdd Updated 2020-06-20 16:10:27 +01:00
ItzEmerald 3077772aff Merge branch 'SupportBot-6.0' of https://github.com/1tzemerald/SupportBot into SupportBot-6.0 2020-06-20 15:46:18 +01:00
ItzEmerald f40aa9ed14 push 2020-06-20 13:02:46 +01:00
ItzEmerald 4ae6dc3a69 Update guildMemberAdd.js 2020-06-20 00:18:17 +01:00
ItzEmerald bdb8389d8d Merge branch 'SupportBot-6.0' of https://github.com/1tzemerald/SupportBot into SupportBot-6.0 2020-06-20 00:11:02 +01:00
ItzEmerald f7254c7ec7 Push 2020-06-20 00:10:38 +01:00
ItzEmerald 3701156362 Merge pull request #35 from real2two/patch-20
Update newticket.js
2020-06-19 23:42:03 +01:00
Two 575d25f5ad Update newticket.js 2020-06-16 21:54:40 -04:00
Two 698b82c7d3 Update newticket.js 2020-06-15 21:29:31 -04:00
ItzEmerald eaa9da6d2e 6.0-Dev Edition 2020-06-15 23:58:37 +01:00
ItzEmerald ca7294a0e3 Delete supportbot-config.yml 2020-06-15 23:47:10 +01:00
ItzEmerald 5281ffce60 overwrite Permissions to updateOverwrite 2020-06-12 23:30:34 +01:00
ItzEmerald 2f84fd3b33 overwritePermissions to updateOverwrite 2020-06-12 23:30:01 +01:00
ItzEmerald bef270da74 Update LICENSE 2020-05-19 00:40:47 +01:00
ItzEmerald bdf839ffca Merge pull request #31 from 1tzemerald/add-license-1
Create LICENSE
2020-05-10 00:42:44 +01:00
ItzEmerald b1b2ead0d8 Create LICENSE 2020-05-10 00:42:31 +01:00
ItzEmerald 0b74473c64 Delete LICENSE 2020-05-10 00:40:43 +01:00
lynxgian 2fb189cf5c updated Readme.md 2020-05-07 19:32:16 -04:00
lynxgian 24a29639e9 Update README.md 2020-05-07 19:30:53 -04:00
ItzEmerald 50258dc359 Update index.js 2020-04-21 20:20:42 +01:00
ItzEmerald d9c6b7698f Update index.js 2020-04-21 19:37:28 +01:00
ItzEmerald f042f34ae2 Update index.js 2020-04-21 19:24:15 +01:00
ItzEmerald c087edc14f Update suggest.js 2020-04-18 22:49:03 +01:00
55 changed files with 2379 additions and 1253 deletions

No files matched your search

-2
View File
@@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto
-23
View File
@@ -1,23 +0,0 @@
---
name: Bug report
about: Create a bug report to help us improve SupportBot.
title: "[BUG]"
labels: bug
assignees: EmeraldRusher
---
**Describe the bug**
A clear and concise description of the bug you found and how you found it.
**How did you find it**
Please could explain what you did to find the bug?
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Feel free to notify with us with anything else about the problem here.
+32
View File
@@ -0,0 +1,32 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm install discord.js --save
- run: npm install js-yaml
- run: npm run build --if-present
- run: node index.js
-76
View File
@@ -1,76 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# FuseBox cache
.fusebox/
-18
View File
@@ -1,18 +0,0 @@
FROM node:alpine
MAINTAINER Thien Tran, <contact@thientran.io>
RUN apk update \
&& apk upgrade
RUN apk add --no-cache git && \
adduser -D -h /home/container container
# Ensure UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/ash", "/entrypoint.sh"]
+2 -2
View File
@@ -1,11 +1,11 @@
MIT License
Copyright (c) 2020 Emerald Services
Copyright (c) 2021 Emerald Services
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
to use, copy, modify, merge, publish, distribute, sublicense
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Regular → Executable
+13 -5
View File
@@ -1,5 +1,13 @@
<h1 align="center">SupportBot</h1>
<p align="center">Created by Emerald SRV</p>
<p align="center"> SupportBot is a free self-hosted discord that is developed/designed to help control and manage the support that takes place throughout your discord server(s). SupportBot has been going around since late-2018 and it's still being constantly, updated and supported today. Alongside the core features of SupportBot which is support related features such as tickets etc.. we also allow additional addons which are made by both 3rd-party and official developers. If something goes wrong with SupportBot you can simply come to our discord server and contact us. We will be happy to help. Also! if anyone ever tells you that "nothing is free" then tell them to think again. Sometimes you just have to look a little harder to find what you want.</p>
Version 5.2
<hr>
![imgur](https://i.imgur.com/TQj40Mt.png)
## What is SupportBot?
SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customisation to match your own brand.
## Quick Links
**|** [Discord](https://emeraldsrv.dev/discord) **|**
[Hosting](https://emeraldsrv.dev/hosting) **|**
[Documentation](https://docs.emeraldsrv.dev) **|**
[Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518) **|**
[Download via MC-Market](https://www.mc-market.org/resources/8940/) **|**
-1
View File
@@ -1 +0,0 @@
theme: jekyll-theme-cayman
+20
View File
@@ -0,0 +1,20 @@
// SupportBot, Created by Emerald Services
// Help Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
// location for the addons configuration, to keep it simple we generate a settings folder within the addons directory.
const example = yaml.load(fs.readFileSync('./addons/settings/exampleaddon.yml', 'utf8'));
module.exports = {
name: example.ExampleAddonCommand,
description: example.ExampleAddonDesc,
execute(message, args) {
if (supportbot.DeleteMessages == "true") message.delete();
message.channel.send(example.ExampleAddonMessage)
}
};
BIN
View File
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
#
# SupportBot, Created by Emerald Services
# Example Addon
#
ExampleAddonCommand: "exampleaddon"
ExampleAddonDesc: "This is the default/example addon for SupportBot."
ExampleAddonMessage: "> :white_check_mark: This is the **default** addon for SupportBot. You can download addons from our website, https://emeraldservices.xyz/"
-52
View File
@@ -1,52 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Add
const Discord = require("discord.js");
const bot = new Discord.Client()
const fs = require("fs")
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Add_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const outsideticket = new Discord.MessageEmbed()
.setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setColor(supportbot.WarningColour);
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
const cantfinduser = new Discord.MessageEmbed()
.setTitle("Invalid User!")
.setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Add_Command} <user#0000>\``)
.setColor(supportbot.WarningColour);
if(!rUser) return message.channel.send({embed: cantfinduser});
message.channel.updateOverwrite(rUser, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
const useradded = new Discord.MessageEmbed()
.setColor(supportbot.SuccessColour)
.setTitle("User Added")
.setDescription(`👍 ${rUser} has been added to this ticket`)
.setTimestamp();
message.channel.send({embed: useradded});
};
exports.help = {
name: supportbot.Add_Command,
};
+64
View File
@@ -0,0 +1,64 @@
// SupportBot, Created by Emerald Services
// Add User
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.AddUser,
description: supportbot.AddUserDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
.setColor(supportbot.WarningColour)
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setColor(supportbot.WarningColour);
message.channel.send({ embed: Exists });
return;
}
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
.setColor(supportbot.ErrorColour)
if (!rUser) return message.channel.send({ embed: UserNotExist });
message.channel.updateOverwrite(rUser, {
VIEW_CHANNEL: true,
CREATE_INVITE: false,
SEND_MESSAGES: true,
READ_MESSAGES: true
});
const Complete = new Discord.MessageEmbed()
.setTitle("User Added!")
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
.setTimestamp()
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: Complete });
} else {
return message.channel.send({ embed: NoPerms });
}
}
};
Regular → Executable
+63 -47
View File
@@ -1,55 +1,71 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Announce (including @everyone)
// SupportBot, Created by Emerald Services
// Announce
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const fs = require("fs")
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
module.exports = {
name: supportbot.AnnounceCommand,
description: supportbot.AnnounceDesc,
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Announcement_Command}`);
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel) || message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.id === supportbot.AnnouncementChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${Admins.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(Admins.id))
return message.channel.send({ embed: NoPerms });
const embed = new Discord.MessageEmbed()
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: embed });
let announcement = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
announcement.push(collected.map(r => r.content));
locateChannel.send('@everyone')
const AnnouncementEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.AnnouncementTitle)
.setThumbnail(supportbot.AnnouncementIcon)
.setDescription(announcement)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
locateChannel.send({ embed: AnnouncementEmbed }).then(async function(msg) {
const AnnouncementComplete = new Discord.MessageEmbed()
.setColor(supportbot.SuccessColour)
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
message.channel.send({ embed: AnnouncementComplete })
})
});
}
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const embed = new Discord.MessageEmbed()
.setTitle(`${supportbot.Announcement_Title}`)
.setDescription(args.join(" "))
.setTimestamp()
.setColor(supportbot.EmbedColour)
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Announcement_Channel}`)
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Announcement_Channel}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
locateChannel.send(supportbot.everyone).then((msg) => {
locateChannel.send(embed);
});
const AccSuccessEmbed = new Discord.MessageEmbed()
.setTitle("Announcement Created")
.setDescription(`👍 Successfully sent your announcement to <#${locateChannel.id}>`)
.setColor(supportbot.EmbedColour)
message.channel.send({embed: AccSuccessEmbed});
}
exports.help = {
name: supportbot.Announcement_Command,
}
};
+108
View File
@@ -0,0 +1,108 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BanUser,
description: supportbot.BanDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embed: NoPerms });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please provide a reason to ban.\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embed: embed1
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embed: embed2
})
const embed3 = new Discord.MessageEmbed()
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
.setColor(supportbot.EmbedColour)
if(!user.bannable) return message.channel.send({
embed: embed3
});
const embed4 = new Discord.MessageEmbed()
.setDescription("> :joy: **OML!** Did you really just try to ban yourself!")
.setColor(supportbot.EmbedColour)
if(user.id === message.author.id) return message.channel.send({
embed: embed4
});
let reason = args.slice(1).join(" ");
if(!reason) reason = 'No Reason Provided.';
const embed5 = new Discord.MessageEmbed()
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
.setColor(supportbot.EmbedColour)
user.ban({ days: supportbot.DaysBannedFor, reason: `${reason}` }).catch(err => {
message.channel.send({ embed: embed5 })
console.log(err)
})
const successEmbed = new Discord.MessageEmbed()
.setDescription(`> :white_check_mark: **OOF!** ${user} has been banned!`)
.setColor(supportbot.SuccessColour)
message.channel.send({
embed: successEmbed
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.BanTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Banned User:', user)
.addField('Staff Member', message.author)
.addField('Reason:', reason)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.BanLogColour)
.setTimestamp()
locateChannel.send({ embed: logEmbed })
}
};
+100
View File
@@ -0,0 +1,100 @@
// SupportBot, Created by Emerald Services
// Blacklist Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BlacklistUser,
description: supportbot.BlacklistDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id)) {
return message.channel.send({ embed: NoPerms });
}
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please mention or write an ID\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embed: embed1
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embed: embed2
});
let role = message.guild.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || message.guild.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)
const embed3 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem to find the blacklist role.\n\n`Did you created it?")
.setColor(supportbot.ErrorColour)
if (!role) return message.channel.send({
embed: embed3
});
const embed4 = new Discord.MessageEmbed()
.setDescription(`${user} is already blacklisted`)
.setColor(supportbot.ErrorColour)
if(user.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || user.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send({
embed: embed4
})
};
user.roles.add(role);
const embed5 = new Discord.MessageEmbed()
.setDescription(`Blacklisted ${user} successfully from creating a ticket`)
.setColor(supportbot.EmbedColour)
message.channel.send({
embed: embed5
});
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.BlacklistTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Banned User:', user)
.addField('Staff Member', message.author)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.BlacklistColour)
.setTimestamp()
locateChannel.send({ embed: logEmbed });
}
};
+51
View File
@@ -0,0 +1,51 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BotSay,
description: supportbot.BotSayDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embed: NoPerms });
const embed = new Discord.MessageEmbed()
.setDescription(`> **What would you like me to say!**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: embed });
let announcement = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
announcement.push(collected.map(r => r.content));
const AnnouncementEmbed = new Discord.MessageEmbed()
.setDescription(announcement)
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: AnnouncementEmbed })
})
}
};
Regular → Executable
+112 -81
View File
@@ -1,116 +1,147 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Close
// SupportBot, Created by Emerald Services
// Close Command
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
/**
* @param {Discord.Message} message
*/
module.exports = {
name: supportbot.CloseTicket,
description: supportbot.CloseTicketDesc,
exports.run = (bot, message, args) => {
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setColor(supportbot.WarningColour);
message.channel.send({ embed: Exists });
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Close_Command}`);
return;
if ( !message.channel.name.startsWith( `${supportbot.Ticket_Channel_Name}-` ) ) {
const embed = new Discord.MessageEmbed()
.setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setColor(supportbot.WarningColour);
message.channel.send(embed);
return;
}
}
const closeRequestEmbed = new Discord.MessageEmbed()
.setDescription(`**${supportbot.Ticket_Closure}**`)
.addField("Please confirm by repeating the following word..", `||**${supportbot.Closure_Confirm_Word}**||`)
.setFooter("Your request will be avoided in 20 seconds")
.setColor(supportbot.EmbedColour)
if (supportbot.CloseConfirmation) {
const CloseTicketRequest = new Discord.MessageEmbed()
.setTitle(`**${supportbot.ClosingTicket}**`)
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
.setColor(supportbot.EmbedColour);
message.channel.send(CloseTicketRequest).then(m => {
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.ClosingConfirmation_Word, {
max: 1,
time: 20000,
errors: [ 'time' ],
message.channel.send(closeRequestEmbed).then( m => {
message.channel.awaitMessages( response => response.content.toLowerCase() === supportbot.Closure_Confirm_Word, {
max: 1,
time: 20000,
errors: [ 'time' ],
}).then( collected => {
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
let user = message.author;
let reason = args.join(" ") || "No Reason Provided.";
} ).then( collected => {
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.Transcript_Log);
let name = message.channel.name;
let ticketChannel = message.channel;
let user = message.author;
message.channel.send(`**${supportbot.ClosingTicket}**`)
let reason = args.join(" ") || "No reason provided.";
.then(() => {
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Closed By", message.author.tag)
.addField("Reason", reason);
let name = message.channel.name;
let ticketChannel = message.channel;
message.channel.send(`**${supportbot.Ticket_Closing}**`)
.then(() => {
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.Transcript_Title)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Ticket Author", user)
.addField("Closed By", message.author.tag)
.addField("Reason", reason);
message.channel.messages.fetch({ limit: 100 })
.then( msgs => {
let txt = '';
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
let html = '';
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
txt += `${message.guild.name}\n`;
txt += `#${ticketChannel.name}\n`;
txt += `${msgs.size} messages\n\n\n`;
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
msgs.forEach( msg => {
if ( msg.content ) {
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
txt += `${msg.content}\n`;
txt += `-----\n\n`;
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
} );
});
// message.author.send( `A transcript has been generated for the ticket you closed.` );
// message.author.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) );
logChannel.send(logEmbed).catch(err => {
message.reply(err)
})
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
logChannel.send( new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` ) );
message.channel.delete();
// message.channel.messages.fetch( { limit: 100, before: msgs.last().id } )
})
})
// .then( msg => {
// const merged = msgs.concat( msg );
// const output = merged.reduce( ( out, msg ) => {
// out += `[${message.createdAt}] ${message.author.tag}: ${message.cleanContent ? message.cleanContent.replace( /\n/g, '\r\n' ) : ''}\r\n`;
// return out;
// }, '' );
// log.send( { files: [ { attachment: Buffer.from( output, 'utf8' ), name: `${name}.txt` } ] } ).then( c.delete() ).catch( console.error ); // sends the file to logs
// return log.send( embed1 ).catch( console.error );
// } )
});
})
}).catch( () => {
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
});
});
}).catch( () => {
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
});
}
}
if (!supportbot.CloseConfirmation) {
exports.help = {
name: supportbot.Close_Command,
}
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
let user = message.author;
let reason = args.join(" ") || "No Reason Provided.";
let name = message.channel.name;
let ticketChannel = message.channel;
message.channel.send(`**${supportbot.ClosingTicket}**`)
.then(() => {
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Closed By", message.author.tag)
.addField("Reason", reason);
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
let html = '';
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
msgs.forEach( msg => {
if ( msg.content ) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
});
logChannel.send(logEmbed).catch(err => {
message.reply(err)
})
logChannel.send( new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` ) );
message.channel.delete();
})
}).catch( () => {
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
});
}
}
};
-70
View File
@@ -1,70 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Forceclose
const Discord = require("discord.js");
const bot = new Discord.Client()
const fs = require("fs")
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Forceclose_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const outsideticket = new Discord.MessageEmbed()
.setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setColor(supportbot.WarningColour);
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
const log = message.guild.channels.cache.find(channel => channel.name === supportbot.Transcript_Log)
const uID = message.author
const reason = args.join(" ") || "No Reason Provided.";
const name = message.channel.name;
const c = message.channel;
message.channel.send(`Your ticket is currently closing`)
.then(() => {
const embed1 = new Discord.MessageEmbed()
.setTitle(supportbot.Transcript_Title)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Ticket Author", uID)
.addField("Closed By", message.author.tag)
.addField("Reason", reason)
message.channel.messages.fetch({ limit: 100 })
.then(msgs => {
message.channel.messages.fetch({ limit: 100, before: msgs.last().id })
.then(msg => {
const merged = msgs.concat(msg);
const output = merged.reduce((out, msg) => {
out += `[${message.createdAt}] ${message.author.tag}: ${message.cleanContent ? message.cleanContent.replace(/\n/g, '\r\n') : ''}\r\n`;
return out;
}, '');
log.send({ files: [{ attachment: Buffer.from(output, 'utf8'), name: `${name}.txt` }] }).then(c.delete()).catch(console.error); // sends the file to logs
return log.send(embed1).catch(console.error);
})
});
});
}
exports.help = {
name: supportbot.Forceclose_Command,
}
+70 -38
View File
@@ -1,52 +1,84 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Help
// SupportBot, Created by Emerald Services
// Help Command
const Discord = require("discord.js");
const bot = new Discord.Client()
const fs = require("fs");
const fs = require("fs")
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
module.exports = {
name: supportbot.HelpCommand,
description: supportbot.HelpDesc,
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Help_Command}`);
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let userCommands = "";
userCommands += `**${supportbot.Prefix}${supportbot.Ticket_Command} <reason>**: Create a support ticket\n`;
userCommands += `**${supportbot.Prefix}${supportbot.Close_Command}**: Close your support ticket\n`;
userCommands += `**${supportbot.Prefix}${supportbot.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
userCommands += `**${supportbot.Prefix}${supportbot.Report_Command} <user> <reason>**: Report a valid user\n`;
userCommands += `**${supportbot.Prefix}${supportbot.Link_Command}**: Get some important links!\n`;
userCommands += `**${supportbot.Prefix}${supportbot.Ping_Command}**: Check the bots ping. Pong!\n`;
let supportCommands = "";
supportCommands += `**${supportbot.Prefix}${supportbot.Add_Command} <user>**: Adds a user to a ticket\n`;
supportCommands += `**${supportbot.Prefix}${supportbot.Remove_Command} <user>**: Removes a user from a ticket\n`;
supportCommands += `**${supportbot.Prefix}${supportbot.Forceclose_Command}**: Forceclose a support ticket\n`;
supportCommands += `**${supportbot.Prefix}${supportbot.Rename_Command}**: Rename a support ticket\n`;
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(staffRole => staffRole.id === supportbot.Staff);
let AdminStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin);
if (supportbot.HelpMenu) {
let generalCommands = "";
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinksDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
let supportCommands = "";
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
let staffCommands = "";
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.PurgeMessage}** ${supportbot.PurgeDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.ChatLog}** ${supportbot.ChatLogDesc}\n`
let adminCommands = "";
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
adminCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
adminCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
adminCommands += `**${supportbot.Prefix}${supportbot.BlacklistUser}** ${supportbot.BlacklistDesc} \`Admin Only\` \n`
const HelpEmbed1 = new Discord.MessageEmbed()
.setTitle(supportbot.Bot_Name)
.setThumbnail(message.author.displayAvatarURL())
let staffCommands = "";
staffCommands += `**${supportbot.Prefix}${supportbot.Announcement_Command} <message>**: Create a bot announcement\n`;
staffCommands += `**${supportbot.Prefix}${supportbot.Say_Command} <message>**: Send a message as the bot\n`;
staffCommands += `**${supportbot.Prefix}${supportbot.Lockchat_Command}**: Lock the chat channel\n`;
staffCommands += `**${supportbot.Prefix}${supportbot.UnLockchat_Command}**: UnLock the chat channel\n`;
staffCommands += `**${supportbot.Prefix}${supportbot.Poll_Command}**: Create a poll\n`;
.addFields(
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, inline: false },
)
const embed = new Discord.MessageEmbed()
.setTitle(supportbot.Bot_Name)
.addField("🟨 User Commands", userCommands)
.addField("🎫 Support Commands", supportCommands)
.addField("🔐 Staff Commands", staffCommands)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL);
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
message.channel.send(embed);
if (message.member.roles.cache.has(SupportStaff.id)) {
HelpEmbed1.addFields(
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
)
}
if (message.member.roles.cache.has(AdminStaff.id)) {
HelpEmbed1.addFields(
{ name: '🔐 Admin Commands\n', value: `${adminCommands}\n`, inline: false },
)
}
}
if (supportbot.SendHelpPage === "dm") {
message.author.send({
embed: HelpEmbed1
});
}
exports.help = {
name: supportbot.Help_Command,
if (supportbot.SendHelpPage === "channel") {
message.channel.send({
embed: HelpEmbed1
});
}
}
}
};
+109
View File
@@ -0,0 +1,109 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.KickUser,
description: supportbot.KickDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embed: NoPerms });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please provide a reason to kick.\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embed: embed1
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embed: embed2
})
const embed3 = new Discord.MessageEmbed()
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
.setColor(supportbot.EmbedColour)
if(!user.kickable) return message.channel.send({
embed: embed3
});
const embed4 = new Discord.MessageEmbed()
.setDescription("> :joy: **OML!** Did you really just try to kick yourself!")
.setColor(supportbot.EmbedColour)
if(user.id === message.author.id) return message.channel.send({
embed: embed4
});
let reason = args.slice(1).join(" ");
if(!reason) reason = 'No Reason Provided.';
const embed5 = new Discord.MessageEmbed()
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
.setColor(supportbot.EmbedColour)
user.kick({ reason: `${reason}` }).catch(err => {
message.channel.send({ embed: embed5 })
console.log(err)
})
const successEmbed = new Discord.MessageEmbed()
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
.setColor(supportbot.SuccessColour)
message.channel.send({
embed: successEmbed
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.KickTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Kicked User:', user)
.addField('Staff Member', message.author)
.addField('Reason:', reason)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.KickLogColour)
.setTimestamp()
locateChannel.send({ embed: logEmbed })
}
};
Regular → Executable
+22 -24
View File
@@ -1,36 +1,34 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Links
// SupportBot, Created by Emerald Services
// Links Command
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = ( bot, message, args ) => {
module.exports = {
name: supportbot.LinksCommand,
description: supportbot.LinksDesc,
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Link_Command}`);
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
const LinksEmbed = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
let botLinks = supportbot.LINKS;
let botLinks = supportbot.LINKS;
let links = '';
for ( let name in botLinks ) {
links += `[${name}](${botLinks[ name ]})\n`;
};
let links = '';
LinksEmbed.addField(supportbot.LinksTitle, links)
for ( let name in botLinks ) {
links += `[${name}](${botLinks[ name ]})\n`;
};
let embed = new Discord.MessageEmbed()
.setTitle(supportbot.LINKS_TITLE)
.setDescription(links)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter);
message.channel.send(embed);
message.channel.send({ embed: LinksEmbed });
};
exports.help = {
name: supportbot.Link_Command,
}
};
-38
View File
@@ -1,38 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Close
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async(bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Lockchat_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`)
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
const lockmsg = new Discord.MessageEmbed()
.setDescription(":white_check_mark: **Chat Locked**")
.setColor(supportbot.EmbedColour)
message.channel.send(lockmsg);
};
exports.help = {
name: supportbot.Lockchat_Command,
};
Regular → Executable
+16 -17
View File
@@ -1,26 +1,25 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Ping
// SupportBot, Created by Emerald Services
// Ping Command
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
module.exports = {
name: supportbot.PingCommand,
description: supportbot.PingDesc,
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ping_Command}`);
const embed = new Discord.MessageEmbed()
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
.setColor(supportbot.EmbedColour)
message.channel.send(embed).catch(console.error);
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let ping = Date.now() - message.createdTimestamp + " ms";
const PingCommandEmbed = new Discord.MessageEmbed()
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: PingCommandEmbed });
}
};
exports.help = {
name: supportbot.Ping_Command,
}
-50
View File
@@ -1,50 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Poll
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Poll_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const embed = new Discord.MessageEmbed()
.setTitle(`${supportbot.Poll_Title}`)
.setDescription(args.join(" "))
.setTimestamp()
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Poll_Channel}`)
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Poll_Channel}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
locateChannel.send(embed)
.then(async function(msg) {
msg.react(supportbot.Reaction_Poll_1).then(() => msg.react(supportbot.Reaction_Poll_2));
});
};
exports.help = {
name: supportbot.Poll_Command,
};
+80
View File
@@ -0,0 +1,80 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.PurgeMessage,
description: supportbot.PurgeDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embed: NoPerms });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
const embed1 = new Discord.MessageEmbed()
.setDescription(`> :thinking: **Hmm!** Please enter a valid number of message to purge!\n\n\`${supportbot.Prefix}${supportbot.PurgeMessage} <message count>\` `)
.setColor(supportbot.WarningColour)
if (!args[0]) return message.channel.send({
embed: embed1
});
const messagePrune = parseInt(args[0])
const embed2 = new Discord.MessageEmbed()
.setDescription("> :person_facepalming: **Grr!** Can you count? That ain't a number :joy:")
.setColor(supportbot.ErrorColour)
if (isNaN(messagePrune)) return message.reply({
embed: embed2
})
message.channel.bulkDelete(messagePrune).then(() => {
const embed3 = new Discord.MessageEmbed()
.setDescription(`> :recycle: \`${args[0]} messages\` **have been purged!** `)
.setColor(supportbot.ErrorColour)
message.channel.send({
embed: embed3
})
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.PruneLogTitle)
.setThumbnail(supportbot.PruneThumbnail)
.addField('Messages Purged', `\`${args[0]} messages\``)
.addField('Staff Member', message.author)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.PruneColour)
.setTimestamp()
locateChannel.send({ embed: logEmbed })
}
};
-53
View File
@@ -1,53 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Remove
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Remove_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const outsideticket = new Discord.MessageEmbed()
.setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setColor(supportbot.WarningColour);
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
const cantfinduser = new Discord.MessageEmbed()
.setTitle("Invalid User!")
.setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Remove_Command} <user#0000>\``)
.setColor(supportbot.WarningColour);
if(!rUser) return message.channel.send({embed: cantfinduser});
message.channel.updateOverwrite(rUser, { VIEW_CHANNEL: false, CREATE_INVITE: false, SEND_MESSAGES: false, READ_MESSAGES: false });
const useradded = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
.setTitle("User Removed")
.setDescription(`👍 ${rUser} has been removed from this ticket`)
.setTimestamp();
message.channel.send({embed: useradded});
};
exports.help = {
name: supportbot.Remove_Command,
}
+62
View File
@@ -0,0 +1,62 @@
// SupportBot, Created by Emerald Services
// Remove User
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.RemoveUser,
description: supportbot.RemoveUserDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${supportbot.Staff}\` or \`${supportbot.Admin}\``)
.setColor(supportbot.WarningColour)
if (message.member.roles.cache.has(SupportStaff.id) || message.member.roles.cache.has(Admins.id)) {
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
const Exists = new Discord.MessageEmbed()
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setColor(supportbot.WarningColour);
message.channel.send({ embed: Exists });
return;
}
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
.setColor(supportbot.ErrorColour)
if (!rUser) return message.channel.send({ embed: UserNotExist });
message.channel.updateOverwrite(rUser, {
VIEW_CHANNEL: false,
CREATE_INVITE: false,
SEND_MESSAGES: false,
READ_MESSAGES: false
});
const Complete = new Discord.MessageEmbed()
.setTitle("User Removed!")
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
.setTimestamp()
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: Complete });
} else {
return message.channel.send({ embed: NoPerms });
}
}
};
-53
View File
@@ -1,53 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Rename
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Rename_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const outsideticket = new Discord.MessageEmbed()
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
.setColor(supportbot.colour)
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
const renameto = args.join(" ")
message.channel.setName(`${supportbot.Ticket_Channel_Name}-${renameto}`)
// Renamed Ticket Logistic
const logEmbed = new Discord.MessageEmbed()
.setTitle(":ticket: Ticket Renamed")
.setDescription(`<@${message.author.id}> has renamed a ticket to ${supportbot.Ticket_Channel_Name}-${renameto}`)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`)
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
locateChannel.send(logEmbed)
};
exports.help = {
name: supportbot.Rename_Command,
}
-69
View File
@@ -1,69 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Report
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Report_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`);
if(!staffGroup) {
message.reply(rolemissing).catch(err => {
console.error(err);
});
} else {
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour)
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
if(!message.member.roles.cache.has(staffGroup.id)) {
message.reply(donothaverole);
} else {
if(!args[0]) {
message.reply(":x: Sorry! Please specify the user to report.");
} else {
if(!args[1]) {
message.reply(":x: Sorry! Specify the reason of your report.");
} else {
let reportDesc = args.slice(1).join(" ");
const embed = new Discord.MessageEmbed()
.setTitle(`${supportbot.Report_Title}`)
.setThumbnail(message.author.avatarURL)
.addField("Report by:", `<@${message.author.id}>`, false)
.addField("Description:", `${reportDesc}`, false)
.addField("Reported User:", `${args[0]}`, false)
.setTimestamp(new Date())
.setColor(supportbot.EmbedColour)
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL);
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Report_Channel}`)
if(!locateChannel) {
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Report_Channel}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
} else {
locateChannel.send(embed);
}
}
}
}
}
};
exports.help = {
name: supportbot.Report_Command
}
-38
View File
@@ -1,38 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Say
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = (bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Say_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole);
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
const embed = new Discord.MessageEmbed()
.setTitle(`${supportbot.Announcement_Title}`)
.setDescription(args.join(" "))
.setTimestamp()
.setColor(supportbot.EmbedColour)
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
message.channel.send(embed);
};
exports.help = {
name: supportbot.Say_Command,
}
Regular → Executable
+56 -34
View File
@@ -1,48 +1,70 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Say
// SupportBot, Created by Emerald Services
// Suggest Command
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async(bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Suggest_Command}`);
module.exports = {
name: supportbot.SuggestCommand,
description: supportbot.SuggestionDesc,
const SuggestionEmbed = new Discord.MessageEmbed()
.setTitle(`${supportbot.Suggestion_Title}`)
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
.setFooter(`${supportbot.EmbedFooter}`, message.author.avatarURL)
.setTimestamp(new Date())
.setColor(supportbot.EmbedColour)
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel) || message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.id === supportbot.SuggestionChannel)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Suggestion_Channel}`)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
.setColor(supportbot.ErrorColour);
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Suggestion_Channel}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
const embed = new Discord.MessageEmbed()
.setDescription(`> **${supportbot.SuggestionStarter}**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: embed });
let suggestion = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
suggestion.push(collected.map(r => r.content));
const SuggestionMessage = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField(supportbot.SuggestionTitle, suggestion, true)
.addField("From", `<@${message.author.id}>`, true)
if (supportbot.SuggestionMessage_Icon === "BOT") {
SuggestionMessage.setThumbnail(bot.user.displayAvatarURL())
}
locateChannel.send(SuggestionEmbed)
if (supportbot.SuggestionMessage_Icon === "USER") {
SuggestionMessage.setThumbnail(message.author.displayAvatarURL())
}
.then(async function(msg) {
msg.react(supportbot.suggestyes).then(() => msg.react(supportbot.suggestno));
});
if (supportbot.SuggestionMessage_Icon === "CUSTOM") {
SuggestionMessage.setThumbnail(supportbot.SuggestionIcon_URL)
}
const SuggestionSuccessEmbed = new Discord.MessageEmbed()
.setDescription(`👍 Suggestion has been successfully created\nYou can view your suggestion in <#${locateChannel.id}>`)
.setColor(supportbot.EmbedColour)
message.channel.send(SuggestionSuccessEmbed);
locateChannel.send({ embed: SuggestionMessage }).then(async function(msg) {
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
});
const SuggestionComplete = new Discord.MessageEmbed()
.setColor(supportbot.SuccessColour)
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
message.channel.send({ embed: SuggestionComplete })
});
}
};
exports.help = {
name: supportbot.Suggest_Command,
}
+206 -142
View File
@@ -1,166 +1,230 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Ticket
// SupportBot, Created by Emerald Services
// Ticket Command
const Discord = require("discord.js");
const bot = new Discord.Client();
const bot = new Discord.Client()
const fs = require("fs");
const fs = require("fs")
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const TicketNumberID = require('../utility/TicketNumber');
const TicketNumberID = require('../utils/TicketNumber.js');
exports.run = async (bot, message, args) => {
module.exports = {
name: supportbot.NewTicket,
description: supportbot.NewTicketDesc,
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ticket_Command}`);
// Ticket Number ID Settings
let ticketNumberID = TicketNumberID.pad(message.guild.id);
// Ticket Subject Settings
const subject = args.join(" ") || `${supportbot.Default_Ticket_Reason}`;
async execute(message, args) {
if (!message.channel.name === supportbot.ReactionChannel || !message.channel.id === supportbot.ReactionChannel) {
if (supportbot.DeleteMessages) message.delete();
}
// Ticket Limitiations
const alreadyopen = new Discord.MessageEmbed()
.setDescription(`:x: Cannot create a ticket because **${supportbot.Ticket_Channel_Name}-${ticketNumberID}** already exists.`)
.setColor(supportbot.EmbedColour)
// Ticket Creation
if (message.guild.channels.cache.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
message.guild.channels.create(`${supportbot.Ticket_Channel_Name}-${ticketNumberID}`, {
type: 'text',
}).then(TicketChannel => {
// Roles
let staff = message.guild.roles.cache.find(supportRole => supportRole.name === `${supportbot.StaffRole}`)
let everyone = message.guild.roles.cache.find(everyoneRole => everyoneRole.name === supportbot.everyone)
let department = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`)
let department2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`)
let department3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_3}`)
let reactionUser = message.guild.members.cache.get(message.author.id)
// Permissions
TicketChannel.updateOverwrite(everyone, { VIEW_CHANNEL: false });
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: false, READ_MESSAGES: true });
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department2, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department3, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
// Category
let category = message.guild.channels.cache.find(c => c.name === supportbot.category);
if (category) {
TicketChannel.setParent(category.id);
} else {
if (message.guild.channels.cache.get(supportbot.category)) {
TicketChannel.setParent(message.guild.channels.cache.get(supportbot.category).id);
}
}
const ticketopened = new Discord.MessageEmbed()
.setTitle(":white_check_mark: Support Ticket Created")
.setDescription(`<@${message.author.id}> your support ticket created successfully`)
.addField("Your Ticket:", `<#${TicketChannel.id}>`)
.setColor(supportbot.SuccessColour)
message.channel.send({embed: ticketopened});
// Ticket Message - ( Able to edit this message via the settings.json file )
const ticketMessage = `Hi! <@${message.author.id}>\n${supportbot.Ticket_Message}`;
const Department_1 = supportbot.Ticket_Department_1;
const Department_2 = supportbot.Ticket_Department_2;
const Department_3 = supportbot.Ticket_Department_3;
const Emoji_1 = supportbot.Ticket_Department_Emoji_1;
const Emoji_2 = supportbot.Ticket_Department_Emoji_2;
const Emoji_3 = supportbot.Ticket_Department_Emoji_3;
const TicketMessage = new Discord.MessageEmbed()
.setDescription(ticketMessage, true)
.addField("Available Departments", `${Emoji_1} ${Department_1}\n${Emoji_2} ${Department_2}\n${Emoji_3} ${Department_3}`)
.setColor(supportbot.Ticket_Colour)
.setFooter(supportbot.EmbedFooter)
if (subject != 'No Subject.') {
TicketMessage.addField("Reason", subject);
}
TicketChannel.send({embed: TicketMessage}).then(function(msg) {
msg.react(Emoji_1).then(() => msg.react(Emoji_2)).then(() => msg.react(Emoji_3));
const filter = (reaction, user) => {
return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== msg.author.id;
};
msg.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
.then(collected => {
const reaction = collected.first();
if (reaction.emoji.name === `${Emoji_1}`) {
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
const dept1 = new Discord.MessageEmbed()
.setDescription(`You have requested to contact ${department}. Please wait patiently for someone to reach out to you.`)
.setColor(supportbot.SuccessColour)
TicketChannel.send(dept1)
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send(`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`).then(msg => {
msg.delete({timeout: 3500})
})
}
if (reaction.emoji.name === `${Emoji_2}`) {
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department2, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
// Ticket ID
let ticketNumberID = TicketNumberID.pad(message.guild.id);
const dept2 = new Discord.MessageEmbed()
.setDescription(`You have requested to contact ${department2}. Please wait patiently for someone to reach out to you.`)
.setColor(supportbot.SuccessColour)
TicketChannel.send(dept2)
// Ticket Subject
const TicketSubject = args || supportbot.NoTicketSubject;
const channel = await message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`);
if (message.channel.name === supportbot.ReactionChannel || message.channel.id === supportbot.ReactionChannel) {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, channel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embed: CreatedTicket}).then((r) => {
r.delete({ timeout:5000 })
})
} else {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, channel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embed: CreatedTicket});
}
// Ticket Category
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory) || message.guild.channels.cache.find(category => category.id === supportbot.TicketCategory)
// Locate Roles
let StaffMember = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
let ServerAdmins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
if (TicketCategory) {
channel.setParent(TicketCategory.id)
}
if (reaction.emoji.name === `${Emoji_3}`) {
TicketChannel.updateOverwrite(message.author, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(staff, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
TicketChannel.updateOverwrite(department3, { VIEW_CHANNEL: true, CREATE_INVITE: false, SEND_MESSAGES: true, READ_MESSAGES: true });
const dept3 = new Discord.MessageEmbed()
.setDescription(`You have requested to contact ${department3}. Please wait patiently for someone to reach out to you.`)
.setColor(supportbot.SuccessColour)
TicketChannel.send(dept3)
}
channel.updateOverwrite(message.guild.id, {
SEND_MESSAGES: false,
VIEW_CHANNEL: false
})
});
channel.updateOverwrite(message.author, {
SEND_MESSAGES: true,
VIEW_CHANNEL: true
})
});
channel.updateOverwrite(StaffMember, {
SEND_MESSAGES: true,
VIEW_CHANNEL: true
})
// Ticket Logging
const logEmbed = new Discord.MessageEmbed()
.setTitle(":ticket: Ticket Log")
.addField("Ticket ID", ticketNumberID, true)
.addField("User", `<@${message.author.id}>`, true)
.addField("Channel", `ticket#${ticketNumberID}`, true)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
channel.updateOverwrite(ServerAdmins, {
SEND_MESSAGES: true,
VIEW_CHANNEL: true
})
if (subject != 'No Subject.') {
logEmbed.addField('Subject', subject, true);
}
// Ticket Created, Message Sent
if (supportbot.AllowTicketMentions) {
channel.send(`<@${message.author.id}>`)
}
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`)
const TicketMessage = new Discord.MessageEmbed()
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, channel.id).replace(/%ticketusername%/g, message.author.username))
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, channel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
if (supportbot.TicketSubject === "embed") {
if (TicketSubject != 'No Reason Provided.') {
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
}
}
if (supportbot.TicketSubject === "description") {
if (TicketSubject != 'No Reason Provided.') {
channel.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${channel.name}`)
}
}
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send(errornochannel);
locateChannel.send(logEmbed)
const reactionMessage = await channel.send({
embed: TicketMessage
}).then( async function(ticketmsg) {
await ticketmsg.react(supportbot.TicketLockReaction)
await ticketmsg.react(supportbot.TicketDeleteReaction)
}).catch(err=>{console.error(err)});
const collector = ticketmsg.createReactionCollector(
(reaction, user) => message.guild.roles.cache.find((staff) => staff.name === supportbot.Staff),
{ dispose: true }
);
collector.on('collect', (reaction, user) => {
switch (reaction.emoji.name) {
case supportbot.TicketLockReaction:
channel.updateOverwrite(message.author, {
SEND_MESSAGES: false,
VIEW_CHANNEL: true
});
const LockTicketEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.TicketLockMessage)
.setColor(supportbot.EmbedColour)
channel.send({embed: LockTicketEmbed})
break;
case supportbot.TicketDeleteReaction:
const DeleteTicketEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.TicketDeleteMessage)
.setColor(supportbot.EmbedColour)
channel.send({embed: DeleteTicketEmbed})
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
let user = message.author;
let reason = args.join(" ") || "No Reason Provided.";
};
let name = message.channel.name;
let ticketChannel = message.channel;
message.channel.send(`**${supportbot.ClosingTicket}**`)
.then(() => {
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Closed By", message.author.tag)
.addField("Reason", reason);
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
let html = '';
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
msgs.forEach( msg => {
if ( msg.content ) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
});
logChannel.send(logEmbed).catch(err => {
message.reply(err)
})
const TranscriptSavedEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.TranscriptSavedMessage)
.setColor(supportbot.SuccessColour)
channel.send({embed: TranscriptSavedEmbed})
logChannel.send( new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` ) );
setTimeout(() => channel.delete(), supportbot.TicketDeleteTime);
})
}).catch( () => {
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
});
break;
}
});
})
fs.writeFileSync("./storage/SupportTickets.json", '{\n "ticket": "' + channel.name + '", \n "id":' + message.author.id + "\n}", (err) => {
if (!err) return;
console.error(err)
})
// Ticket Logs
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.TicketLog}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
const TicketLogs = new Discord.MessageEmbed()
.setTitle(supportbot.TicketLog_Title)
.setThumbnail(supportbot.Ticket_Thumbnail)
.addFields(
{ name: 'Ticket', value: `<#${channel.id}>` },
{ name: 'User', value: `<@${message.author.id}>` },
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.TicketLog) || message.guild.channels.cache.find(LocateChannel => LocateChannel.id === supportbot.TicketLog)
if(!locateChannel) return message.channel.send({ embed: errornochannel });
locateChannel.send({ embed: TicketLogs });
}
}
exports.help = {
name: supportbot.Ticket_Command,
};
+66
View File
@@ -0,0 +1,66 @@
// SupportBot, Created by Emerald Services
// Announce
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.ChatLog,
description: supportbot.ChatLogDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let name = message.channel.name;
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
let html = '';
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>--- Channel Transcript ---</strong><br>`;
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
html += `<strong>Channel:</strong> ${name}<br>`;
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
msgs.forEach( msg => {
if ( msg.content ) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
});
const TranscriptSavedEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.ChatLogSavedMessage)
.setColor(supportbot.SuccessColour)
message.channel.send({embed: TranscriptSavedEmbed})
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.TicketLog}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
const ChatLogs = new Discord.MessageEmbed()
.setTitle(supportbot.ChatLog_Title)
.setThumbnail(supportbot.ChatLog_Thumbnail)
.addFields(
{ name: 'Channel', value: `<#${message.channel.id}>` },
{ name: 'User', value: `<@${message.author.id}>` },
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.ChatLogChannel) || message.guild.channels.cache.find(LocateChannel => LocateChannel.id === supportbot.ChatLogChannel)
if(!locateChannel) return message.channel.send({ embed: errornochannel });
locateChannel.send( new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` ) );
locateChannel.send({ embed: ChatLogs });
})
}
}
-38
View File
@@ -1,38 +0,0 @@
// SupportBot
// Created by © 2020 Emerald Services
// Command: Say
const Discord = require("discord.js");
const bot = new Discord.Client();
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
exports.run = async(bot, message, args) => {
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.UnLockchat_Command}`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`)
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired});
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
const lockmsg = new Discord.MessageEmbed()
.setDescription(":white_check_mark: **Chat Un-Locked**")
.setColor(supportbot.EmbedColour);
message.channel.send(lockmsg);
};
exports.help = {
name: supportbot.UnLockchat_Command,
}
-15
View File
@@ -1,15 +0,0 @@
cd /home/container
if [ "${GIT_CLONE}" == "true" ] || [ "${GIT_CLONE}" == "1" ]; then
if [ "$(ls -A /home/container)" ]; then
echo "Pulling Updates"
git pull
else
echo -e "/home/container is empty.\nCloning files into the directory."
git clone https://github.com/1tzemerald/SupportBot.git
fi
fi
sed -i '/s/BOT_TOKEN_HERE/${BOT_TOKEN}/g' settings.json
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
${MODIFIED_STARTUP}
+58
View File
@@ -0,0 +1,58 @@
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, member) => {
if (supportbot.SystemMessages) {
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(supportbot.SystemMessage_Channel)
if (!SystemChannel) return;
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
console.log(supportbot.AutoRole_Role)
const role = member.guild.roles.cache.find(role => role.name === supportbot.AutoRole_Role) || member.guild.roles.cache.find(role => role.id === supportbot.AutoRole_Role)
member.roles.add(role).catch(console.error);
if (supportbot.SystemMessage_Type === "embed") {
const GuildAddMember = new Discord.MessageEmbed()
.setTitle(supportbot.Welcome_Title)
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, `<@!${member.user.id}>`).replace(/%guildname%/g, member.guild.name))
.setColor(supportbot.EmbedColour)
if (supportbot.SystemMessage_Icon === "BOT") {
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "USER") {
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "CUSTOM") {
SuggestionMessage.setThumbnail(supportbot.SystemMessageIcon_URL)
}
if (supportbot.SystemMessage_EmbedFooter) {
GuildAddMember.setFooter(supportbot.EmbedFooter)
}
SystemChannel.send({ embed: GuildAddMember });
}
if (supportbot.SystemMessage_Type === "normal") {
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
}
}
};
+48
View File
@@ -0,0 +1,48 @@
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, member) => {
if (supportbot.SystemMessages) {
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(supportbot.SystemMessage_Channel)
if (!SystemChannel) return;
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has left ${member.guild.name}!`)
if (supportbot.SystemMessage_Type === "embed") {
const GuildRemoveMember = new Discord.MessageEmbed()
.setTitle(supportbot.Leave_Title)
.setDescription(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
.setColor(supportbot.EmbedColour)
if (supportbot.SystemMessage_Icon === "BOT") {
GuildRemoveMember.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "USER") {
GuildRemoveMember.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.SystemMessage_EmbedFooter === "true") {
GuildRemoveMember.setFooter(supportbot.EmbedFooter)
}
SystemChannel.send({ embed: GuildRemoveMember });
}
if (supportbot.SystemMessage_Type === "normal") {
SystemChannel.send(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
}
}
};
+24
View File
@@ -0,0 +1,24 @@
// SupportBot 6.0, Created by Emerald Services
// Message Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, message) => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
let messageArray = message.content.split(" ");
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]`, `\u001b[36m`, `${message.author.tag}`, `\u001b[33m`, `has executed the command`, `\u001b[36m`,`${supportbot.Prefix}${command}`)
const cmd = bot.commands.get(command);
if(!cmd) return;
cmd.execute(message, args);
};
+36
View File
@@ -0,0 +1,36 @@
// SupportBot 6.0, Created by Emerald Services
// Message Reaction Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
module.exports = async (client, reaction, user) => {
let message = {
guild: reaction.message.channel.guild,
author: user,
content: "N/A",
channel: reaction.message.channel
}
if (supportbot.ReactionTickets) {
if (reaction.message.id === tickets.ReactionMessage_ID) {
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
await reaction.users.remove(user.id)
try {
const cmd = client.commands.get(supportbot.NewTicket);
if(!cmd) return;
cmd.execute(message, message.content);
} catch (error) {
console.error(error);
}
}
}
}
};
+26
View File
@@ -0,0 +1,26 @@
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, message, packet) => {
if (!['MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE'].includes(packet.t)) return;
const channel = bot.channels.cache.get(packet.d.channel_id);
if (channel.messages.has(packet.d.message_id)) return;
channel.messages.fetch(packet.d.message_id).then(message => {
const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
const reaction = message.reactions.get(emoji);
if (reaction) reaction.users.set(packet.d.user_id, bot.users.get(packet.d.user_id));
if (packet.t === 'MESSAGE_REACTION_ADD') {
bot.emit('messageReactionAdd', reaction, bot.users.get(packet.d.user_id));
}
if (packet.t === 'MESSAGE_REACTION_REMOVE') {
bot.emit('messageReactionRemove', reaction, bot.users.get(packet.d.user_id));
}
});
}
+84
View File
@@ -0,0 +1,84 @@
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
module.exports = async (bot) => {
bot.user.setActivity(supportbot.BotActivity, {
type: supportbot.ActivityType,
url: supportbot.StreamingURL
});
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`)
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`)
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`)
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`)
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`)
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`)
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`)
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`)
console.log(` `)
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
console.log(`\u001b[33m`, `${supportbot.Bot_Name} v${supportbot.SupportBot_Version}`, `\u001b[36m`, `Connected to Discord`)
console.log(`\u001b[33m`, `Documentation:`, `\u001b[36m`, `https://docs.emeraldsrv.dev`)
console.log(`\u001b[33m`, `Discord:`, `\u001b[36m`, `https://emeraldsrv.dev/discord`)
console.log(`\u001b[33m`, `Hosting:`, `\u001b[36m`, `https://emeraldsrv.dev/hosting`)
console.log(` `)
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`)
console.log(` `)
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
if (supportbot.ReactionTickets === true) {
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
if (!chan1) {
console.log('\u001b[33m', "[WARN] Ticket reaction panel is not setup, You can do so via the configuration file!")
return false;
}
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(r => {
let embed = new Discord.MessageEmbed()
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
.setColor(supportbot.SuccessColour)
.setFooter(supportbot.EmbedFooter);
if (supportbot.ReactionPanel_Description === true) {
embed.setDescription(supportbot.ReactionDescription)
}
if (supportbot.ReactionPanel_Thumbnail === true) {
embed.setThumbnail(supportbot.ReactionThumbnail)
}
if (supportbot.ReactionPanel_Image === true) {
embed.setImage(supportbot.ReactionImage)
}
bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel).send({
embed: embed
}).then(r => {
let data = {
"ReactionMessage_ID": `${r.id}`
}
let yamlStr = yaml.dump(data);
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
r.react(supportbot.ReactionEmoji);
}).catch(e => {
console.log(e)
})
})
}
};
Regular → Executable
+85 -137
View File
@@ -1,12 +1,13 @@
// ____ _ ____ _
// / ___| _ _ _ __ _ __ ___ _ __| |_| __ ) ___ | |_
// \___ \| | | | '_ \| '_ \ / _ \| '__| __| _ \ / _ \| __|
// ___) | |_| | |_) | |_) | (_) | | | |_| |_) | (_) | |_
// |____/ \__,_| .__/| .__/ \___/|_| \__|____/ \___/ \__|
// |_| |_|
// © 2020 Created by Emerald Services
// Licnese: MIT
// SupportBot v5.2
// ___ _ ___ _
// / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
// \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
// <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
// |_| |_|
//
// SupportBot created by Emerald Services
// Installed with MIT License
//
// Discord Support: https://emeraldsrv.dev/discord
const Discord = require("discord.js");
const fs = require("fs");
@@ -17,141 +18,88 @@ bot.commands = new Discord.Collection();
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
fs.readdir("./commands/", (err, files) => {
if(err) console.log(err);
let jsfile = files.filter(f => f.split(".").pop() === "js")
if(jsfile.length <= 0) return console.log(`${supportbot.Bot_Name} No commands found. Try to Re-download the resource`);
jsfile.forEach((f, i) =>{
let props = require(`./commands/${f}`);
console.log(`[${supportbot.Bot_Name}] > Command Loaded > ${f}`);
bot.commands.set(props.help.name, props);
});
});
const { promisify } = require("util");
const readdir = promisify(require("fs").readdir);
bot.addons = new Discord.Collection();
String.prototype.toProperCase = function () {
return this.replace(
/([^\W_]+[^\s-]*) */g,
(txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
);
};
fs.readdir("./sb-addons/", (err, files) => {
if(err) console.log(err);
let jsfile = files.filter(f => f.split(".").pop() === "js")
if(jsfile.length <= 0) return console.log(`${supportbot.Bot_Name} No addons detected nor default! Either download addons from https://emeraldservices.xyz/`);
jsfile.forEach((f, i) =>{
let props = require(`./sb-addons/${f}`);
console.log(`[${supportbot.Bot_Name}] > Addons Loaded > ${f}`);
bot.addons.set(props.help.name, props);
});
});
bot.on("ready", async () => {
bot.user.setActivity(supportbot.BotActivity, {type: supportbot.ActvityType});
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`)
console.log(`\u001b[37m`, `You can download additional features from our marketplace https://emeraldservices.xyz/`)
console.log(`\u001b[37m`, `Invite your bot with https://discordapp.com/api/oauth2/authorize?client_id=${bot.user.id}&permissions=8&scope=bot`)
console.log(`\u001b[37m`, `© SupportBot created by Emerald Services`)
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
});
bot.on("message", async message => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
let messageArray = message.content.split(" ");
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
let autoGroup = message.guild.roles.cache.find(autoRole => autoRole.name === `${supportbot.AutoRole}`)
let deptGroup1 = message.guild.roles.cache.find(deptRole1 => deptRole1.name === `${supportbot.Department_Role_1}`)
let deptGroup2 = message.guild.roles.cache.find(deptRole2 => deptRole2.name === `${supportbot.Department_Role_2}`)
let deptGroup3 = message.guild.roles.cache.find(deptRole3 => deptRole3.name === `${supportbot.Department_Role_3}`)
const rolemissing = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Staff role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-01\``)
.setColor(supportbot.ErrorColour)
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
const rolemissing1 = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Auto Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.AutoRole}\`\n\nError Code: \`SB-01\``)
.setColor(supportbot.ErrorColour)
if (!autoGroup) return message.reply(rolemissing1).catch(err=>{console.error(err)})
const rolemissing2 = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_1}\`\n\nError Code: \`SB-01\``)
.setColor(supportbot.ErrorColour)
if (!deptGroup1) return message.reply(rolemissing2).catch(err=>{console.error(err)})
const rolemissing3 = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_2}\`\n\nError Code: \`SB-01\``)
.setColor(supportbot.ErrorColour)
if (!deptGroup2) return message.reply(rolemissing3).catch(err=>{console.error(err)})
const rolemissing4 = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_3}\`\n\nError Code: \`SB-01\` `)
.setColor(supportbot.ErrorColour)
if (!deptGroup3) return message.reply(rolemissing4).catch(err=>{console.error(err)})
const cmd = bot.commands.get(command);
if(!cmd) return;
cmd.run(bot, message, args);
message.delete();
});
bot.on("message", async message => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
let messageArray = message.content.split(" ");
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
const addon = args.shift().toLowerCase();
const cmd = bot.addons.get(addon);
if(!cmd) return;
cmd.run(bot, message, args);
message.delete();
});
// [SupportBot] Welcome Message && Auto Join Role
bot.on("guildMemberAdd", (member) => {
let channel = member.guild.channels.find(channel => channel.name === `${supportbot.WelcomeChannel}`)
let autorole = member.guild.roles.find(autorole => autorole.name === `${supportbot.AutoRole}`)
const WelcomeMsg= new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
.setThumbnail(member.user.avatarURL)
.setDescription(`:wave: ${member.user.username}\n${supportbot.WelcomeMessage}`)
channel.send(WelcomeMsg);
member.addRole(autorole).catch(console.error);
const init = async () => {
const evtFiles = await readdir("./events/");
console.info(`\u001b[36m`, `➢ SupportBot Events`);
console.info(` `);
evtFiles.forEach((file, i) => {
const eventName = file.split(".")[0];
const event = require(`./events/${file}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
bot.on(eventName, event.bind(null, bot));
delete require.cache[require.resolve(`./events/${file}`)];
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Successfully loaded ${evtFiles.length} events.`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
};
init();
fs.readdir("./commands/", (err, files) => {
console.info(`\u001b[36m`, `➢ SupportBot Commands`);
console.info(` `);
if (err) console.info(err, "error");
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
if (jsfiles.length <= 0) {
console.log(`[${supportbot.Bot_Name}]: No commands found. Try to Re-download the resource`);
return;
}
jsfiles.forEach((f, i) => {
let props = require(`./commands/${f}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
bot.commands.set(props.name, props);
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} commands!`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
});
// [SupportBot] Leave Message
fs.readdir("./addons/", (err, files) => {
console.info(`\u001b[36m`, `➢ SupportBot Addons`);
console.info(` `);
if (err) console.info(err, "error");
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
bot.on("guildMemberRemove", (member) => {
let channel = member.guild.channels.find(channel => channel.name === `${supportbot.LeaveChannel}`)
const LeaveMsg= new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
.setThumbnail(member.user.avatarURL)
.setDescription(`:wave: ${member.user.username}\n${supportbot.LeaveMessage}`)
channel.send(LeaveMsg);
if (jsfiles.length <= 0) {
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldsrv.dev`);
return;
}
jsfiles.forEach((f, i) => {
let props = require(`./addons/${f}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Addon Loaded: ${props.name.toProperCase()}`);
bot.commands.set(props.name, props);
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} addons!`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
});
bot.login(supportbot.Token);
+8
View File
@@ -0,0 +1,8 @@
SupportBot Language Compatibility
In order to switch languages simple remove the current existig configuration file and replace it with one of the files here renamnig the file to "supportbot-config.yml" from (for example) "supportbot-config_es.yml" to home directory of SupportBot.
-> Delete the existing supportbot-config.yml file
-> Download the new file for whatever language
-> Upload the file to SupportBot and rename it to supportbot-config.yml
-> Job Done, restart the bot :wink:
+310
View File
@@ -0,0 +1,310 @@
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https://emeraldsrv.dev/discord
SupportBot_Version: "7.1 pre-1"
# -------------------------
# General Configuration
# -------------------------
Token: "BOT_TOKEN_HERE"
Prefix: "!!"
Bot_Name: "SupportBot"
DeleteMessages: true
# Should the bot delete command messages after executed?
# -------------------------
# Activity Configuration
# -------------------------
BotActivity: "-help | SupportBot"
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The ActivityType to "STREAMING" for a streaming status!
ActivityType: "PLAYING"
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
# -------------------------
# Embed Configuration
# -------------------------
EmbedColour: "#f74343"
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
ErrorColour: "#d12519"
SuccessColour: "#04b545"
WarningColour: "#fca117"
# -------------------------
# Help Configuration
# -------------------------
HelpMenu: true # Do not change!
SendHelpPage: "channel" # Set to channel or dm
# -------------------------
# Role Configuration
# -------------------------
AutoRole: true
AutoRole_Role: "Member"
LockdownRole: "@everyone"
Staff: "Staff"
Admin: "Admin"
TicketBlackListRole: "Blacklisted"
# -------------------------
# Tickets Configuration
# -------------------------
# --- General Config ---
# --- Start ---
TicketCategory: "▬▬ TICKETS ▬▬"
TicketChannel: "ticket"
TicketLog: "ticket-logs"
TranscriptLog: "transcripts"
TranscriptTitle: "Ticket Transcript"
TicketBlackListMessage: "You are not allowed to open a ticket"
TicketSubject: "description"
# "description" will displays the ticket reason within the channel description
# "embed" will displays the ticket reason within the ticket embed
AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# Set to false to dis-allow mentions within tickets.
# --- Panel Config ---
# --- Start ---
ReactionChannel: "create-ticket"
ReactionEmoji: "📩"
# For cusomt emojis: <:emoji_name:EMOJI_ID>
ReactionTickets: true
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
ReactionPanel_Description: true
ReactionDescription: "Create a support ticket to contact a member of staff."
ReactionPanel_Thumbnail: true
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
ReactionPanel_Image: true
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
# --- Creation Config ---
# --- Start ---
# Available Placeholders:
# %ticketusername% - User who created the ticket.
# <@%ticketauthor%> - Tags the user who created the ticket.
# <#%ticketid%> - Mentions the ticket channel.
Ticket_Title: "Server Support | %ticketusername%"
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
NoTicketSubject: "No Reason Provided!"
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"
TicketLockReaction: "🔒"
TicketDeleteReaction: "⛔"
TranscriptSavedMessage: "📝 **Transcript Saved!**"
TicketLockMessage: "❌ **Ticket Locked!**"
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
TicketDeleteTime: 5000 # Time must be set in miliseconds.
# --- Closing Config ---
# --- Start ---
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: true
# --- Departments Config ---
# --- Start ---
TicketDepartments: true
AllowStaff: true
# If set to true users with the "Staff" role will not be able to view tickets
# without a valid department role set below.
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
DepartmentEmoji_1: "🙋"
DepartmentEmoji_2: "💸"
DepartmentEmoji_3: "📗"
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
DepartmentTitle_1: "Support"
DepartmentTitle_2: "Billing"
DepartmentTitle_3: "Other"
# Ticket department title, This is the title for a ticket department to help users know what is available.
DepartmentRole_1: "Support"
DepartmentRole_2: "Admin"
DepartmentRole_3: "Support"
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
# --------------------------------
# System Messages Configuration
# --------------------------------
# Available Placeholders:
# %guildname% - This displays the name of the discord server.
SystemMessages: true
SystemMessage_EmbedFooter: false
SystemMessage_Channel: "system-messages"
SystemMessage_Type: "embed"
# There are 2 types of how you can send system messages, 'normal' or 'embed'
SystemMessage_Icon: "USER"
# USER - This will display the user's icon of who joins.
# BOT - This will display the bot's icon when a someone joins.
Welcome_Title: "User Joined!"
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
# %member% define the user who joined and %guildnamne% defines the server name.
Leave_Title: "User Left!"
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
# %member% define the user who left and %guildnamne% defines the server name.
# -------------------------
# Links Configuration
# -------------------------
LinksTitle: "Server Links"
LINKS:
"Website": "https://www.example.com"
"Store": "https://store.example.com"
"Discord": "https://discord.gg/example"
# "Twitter": "https://twitter.com/example"
# "Add More": "Just follow this format!"
# --------------------------
# Suggestion Configuration
# --------------------------
SuggestionChannel: "suggestions"
SuggestionTitle: "Suggestion"
SuggestionStarter: "What would you like to suggest?"
SuggestReact_1: 👍
SuggestReact_2: 👎
# ----------------------------
# Announcement Configuration
# ----------------------------
AnnouncementChannel: "announcements"
AnnouncementTitle: "Servername Announcement"
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
AnnouncementStarter: "What would you like to announce?"
# --------------------------
# Moderation Configuration
# --------------------------
BanTitle: "User Banned!"
DaysBannedFor: 7
BanLogColour: "#D911B4"
KickTitle: "User Kicked!"
KickLogColour: "#D9B111"
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
ModLogChannel: "mod-logs"
PruneLogTitle: "Bulk Delete"
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
PruneColour: "#1BA30C"
BlacklistTitle: "Blacklisted User"
BlacklistColour: "#000000"
# --------------------------
# Command Configuration
# --------------------------
# --- User Commands ---
HelpCommand: "help"
LinksCommand: "links"
PingCommand: "ping"
SuggestCommand: "suggest"
# --- Ticket Commands ---
NewTicket: "ticket"
CloseTicket: "close"
AddUser: "add"
RemoveUser: "remove"
RenameTicket: "rename"
# --- Staff/Admin Commands ---
BotSay: "say"
PurgeMessage: "purge"
AnnounceCommand: "announce"
BanUser: "ban"
KickUser: "kick"
BlacklistUser: "blacklist"
# --------------------------
# Messages Configuration
# --------------------------
# --- Command Messages ---
NewTicketDesc: "Create a new support ticket"
AnnounceDesc: "Create a server announcement"
CloseTicketDesc: "Close your support ticket"
LinksDesc: "View some important links"
PingDesc: "Get the bot's latency"
HelpDesc: "Get a list of all the commands"
RemoveUserDesc: "Remove a user from a support ticket"
AddUserDesc: "Add a user to a support ticket"
SuggestionDesc: "Create a server suggestion"
BotSayDesc: "Say something with the bot"
BanDesc: "Ban a member from this server."
KickDesc: "Kick a member from this server."
PurgeDesc: "Purge messages from the chat."
BlacklistDesc: "Decline a member to open a ticket"
# Error / Warning Messages
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
+120
View File
@@ -0,0 +1,120 @@
{
"name": "supportbot",
"version": "7.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@discordjs/collection": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
"integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
},
"@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"requires": {
"event-target-shim": "^5.0.0"
}
},
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"discord.js": {
"version": "12.5.3",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.3.tgz",
"integrity": "sha512-D3nkOa/pCkNyn6jLZnAiJApw2N9XrIsXUAdThf01i7yrEuqUmDGc7/CexVWwEcgbQR97XQ+mcnqJpmJ/92B4Aw==",
"requires": {
"@discordjs/collection": "^0.1.6",
"@discordjs/form-data": "^3.0.1",
"abort-controller": "^3.0.0",
"node-fetch": "^2.6.1",
"prism-media": "^1.2.9",
"setimmediate": "^1.0.5",
"tweetnacl": "^1.0.3",
"ws": "^7.4.4"
}
},
"event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
},
"js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"requires": {
"argparse": "^2.0.1"
}
},
"mime-db": {
"version": "1.48.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
"integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ=="
},
"mime-types": {
"version": "2.1.31",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
"integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
"requires": {
"mime-db": "1.48.0"
}
},
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
},
"prism-media": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.1.tgz",
"integrity": "sha512-nyYAa3KB4qteJIqdguKmwxTJgy55xxUtkJ3uRnOvO5jO+frci+9zpRXw6QZVcfDeva3S654fU9+26P2OSTzjHw=="
},
"setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
},
"tweetnacl": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
},
"ws": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz",
"integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow=="
}
}
}
+10 -6
View File
@@ -1,15 +1,19 @@
{
"name": "supportbot",
"version": "5.1.0",
"description": "a discord dbot that can you help with your servers support",
"version": "7.1-pre-2",
"description": "SupportBot, a free open-source discord ticket application with ease of use.",
"main": "index.js",
"scripts": {
"test": "-help"
"supportbot": "node index.js"
},
"author": "Emerald SRV",
"keywords": [
"supportbot"
],
"author": "Emerald Services",
"license": "MIT",
"dependencies": {
"discord.js": "^12.1.1",
"js-yaml": "^3.13.1"
"discord.js": "^12.5.3",
"js-yaml": "^4.1.0",
"jsdom": "^16.7.0"
}
}
-19
View File
@@ -1,19 +0,0 @@
// SupportBot Addons
// Default Addon
const Discord = require("discord.js");
const bot = new Discord.Client()
const someaddon = new Discord.Client()
someaddon.settings = require("./settings/someaddon.json");
exports.run = async(bot, message, args) => {
message.delete();
message.channel.send(":white_check_mark: **SupportBot Addon**\nYou can download addons from our marketplace. https://emeraldservices.xyz/")
}
exports.help = {
name: someaddon.settings.Addon_Example_Command,
}
-5
View File
@@ -1,5 +0,0 @@
{
"Addon_Example_Command": "addonexample"
}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
ReactionMessage_ID: ''
-1
View File
@@ -1 +0,0 @@
{}
Regular → Executable
+298 -91
View File
@@ -1,120 +1,327 @@
# _________ __ __________ __
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
# \/ |__| |__| \/
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot v5.2
# Created by © 2020 Emerald Services
# License: MIT
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https://emeraldsrv.dev/discord
SupportBot_Version: "7.1 pre-2"
# -------------------------
# General Configuration
# -------------------------
#Bot Indentification
Token: "BOT_TOKEN_HERE"
Prefix: "!"
Prefix: "!!"
Bot_Name: "SupportBot"
BotActivity: "SupportBot v5.2"
ActivityType: "PLAYING"
DeleteMessages: true
# Should the bot delete command messages after executed?
EmbedColour: "#4bbf5c"
# -------------------------
# Activity Configuration
# -------------------------
BotActivity: "-help | SupportBot"
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The ActivityType to "STREAMING" for a streaming status!
ActivityType: "PLAYING"
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
# -------------------------
# Embed Configuration
# -------------------------
EmbedColour: "#f74343"
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
# Colour Settings
ErrorColour: "#ff3030"
SuccessColour: "#4bbf5c"
ErrorColour: "#d12519"
SuccessColour: "#04b545"
WarningColour: "#fca117"
# Role Settings
AutoRole: "Member"
StaffRole: "Support"
# -------------------------
# Help Configuration
# -------------------------
locked_role: "@everyone"
everyone: "@everyone"
HelpMenu: true # Do not change!
SendHelpPage: "channel" # Set to channel or dm
Department_Role_1: "Support"
Department_Role_2: "Sales"
Department_Role_3: "Support"
# -------------------------
# Role Configuration
# -------------------------
# Ticket Department Settings
Ticket_Department_1: "Support"
Ticket_Department_2: "Sales"
Ticket_Department_3: "Other"
AutoRole: true
AutoRole_Role: "Member"
LockdownRole: "@everyone"
Ticket_Department_Emoji_1: "🟢"
Ticket_Department_Emoji_2: "🔵"
Ticket_Department_Emoji_3: "🔴"
Staff: "Staff"
Admin: "Admin"
TicketBlackListRole: "Blacklisted"
# Ticket Settings
category: "Tickets"
Ticket_Colour: "#4bbf5c"
Ticket_Channel_Name: "ticket"
Ticket_Logs: "ticket-logs"
# -------------------------
# Tickets Configuration
# -------------------------
Transcript_Log: "ticket-data"
Transcript_Title: "Support Transcript"
# --- General Config ---
# --- Start ---
Ticket_Closing: "⚠ Your ticket is now closing!"
Ticket_Closure: "Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket."
Closure_Confirm_Word: "confirm"
TicketCategory: "▬▬ TICKETS ▬▬"
TicketChannel: "ticket"
Ticket_Message: "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you."
Default_Ticket_Reason: "No Subject"
TicketLog: "ticket-logs"
TranscriptLog: "transcripts"
# Welcome & Leave
WelcomeChannel: "welcome"
WelcomeMessage: "Welcome to the server!"
TranscriptTitle: "Ticket Transcript"
TicketLog_Title: "Ticket Log"
TicketBlackListMessage: "You are not allowed to open a ticket"
LeaveChannel: "welcome"
LeaveMessage: "Thank you for visiting us!"
TicketSubject: "description"
# "description" will displays the ticket reason within the channel description
# "embed" will displays the ticket reason within the ticket embed
# Announcement Settings
Announcement_Title: "SupportBot Announcement"
Announcement_Channel: "announcements"
Announcement_Tag_Role: "@everyone"
AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# Set to false to dis-allow mentions within tickets.
# Poll Settings
Poll_Channel: "polls"
Poll_Title: "📊 Polls"
# --- Panel Config ---
# --- Start ---
Reaction_Poll_1: "✅"
Reaction_Poll_2: "❎"
ReactionChannel: "create-ticket"
ReactionEmoji: "📩"
# For cusomt emojis: <:emoji_name:EMOJI_ID>
# Suggestion Settings
Suggestion_Title: "SupportBot Suggestions"
Suggestion_Channel: "suggestions"
ReactionTickets: true
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
suggestyes: "✅"
suggestno: "❎"
ReactionPanel_Description: true
ReactionDescription: "Create a support ticket to contact a member of staff."
# Report Settings
Report_Channel: "reports"
Report_Title: "SupportBot Report"
ReactionPanel_Thumbnail: true
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
# Link Settings
LINKS_TITLE: "SupportBot Links"
ReactionPanel_Image: true
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
LINKS:
"Discord": "https://discord.gg/"
"Twitter": "https://twitter.com/"
"Website": "https://example.com/"
"AddMore": "AddMoreIfYouWant"
# --- Creation Config ---
# --- Start ---
# Bot Command Settings
Add_Command: "add"
Remove_Command: "remove"
Ticket_Command: "ticket"
Close_Command: "close"
Forceclose_Command: "forceclose"
Rename_Command: "rename"
Lockchat_Command: "lock"
UnLockchat_Command: "unlock"
Announcement_Command: "announce"
Say_Command: "say"
Suggest_Command: "suggest"
Ping_Command: "ping"
Help_Command: "help"
Link_Command: "links"
Poll_Command: "poll"
Report_Command: "report"
Setup_Command: "setup"
# Available Placeholders:
# %ticketusername% - User who created the ticket.
# <@%ticketauthor%> - Tags the user who created the ticket.
# <#%ticketid%> - Mentions the ticket channel.
Ticket_Title: "Server Support | %ticketusername%"
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
NoTicketSubject: "No Reason Provided!"
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"
TicketLockReaction: "🔒"
TicketDeleteReaction: "⛔"
TranscriptSavedMessage: "📝 **Transcript Saved!**"
TicketLockMessage: "❌ **Ticket Locked!**"
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
TicketDeleteTime: 5000 # Time must be set in miliseconds.
# --- Closing Config ---
# --- Start ---
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: true
# --- Departments Config ---
# --- Start ---
TicketDepartments: true
AllowStaff: true
# If set to true users with the "Staff" role will not be able to view tickets
# without a valid department role set below.
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
DepartmentEmoji_1: "🙋"
DepartmentEmoji_2: "💸"
DepartmentEmoji_3: "📗"
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
DepartmentTitle_1: "Support"
DepartmentTitle_2: "Billing"
DepartmentTitle_3: "Other"
# Ticket department title, This is the title for a ticket department to help users know what is available.
DepartmentRole_1: "Support"
DepartmentRole_2: "Admin"
DepartmentRole_3: "Support"
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
# --------------------------------
# System Messages Configuration
# --------------------------------
# Available Placeholders:
# %guildname% - This displays the name of the discord server.
SystemMessages: true
SystemMessage_EmbedFooter: false
SystemMessage_Channel: "system-messages"
SystemMessage_Type: "embed"
# There are 2 types of how you can send system messages, 'normal' or 'embed'
SystemMessage_Icon: "USER"
# USER - This will display the user's icon of who joins.
# BOT - This will display the bot's icon when a someone joins.
# CUSTOM - This will allow you to use a custom image, set this below!
SystemMessageIcon_URL: "https://imgur.com/example.png"
Welcome_Title: "User Joined!"
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
# %member% define the user who joined and %guildnamne% defines the server name.
Leave_Title: "User Left!"
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
# %member% define the user who left and %guildnamne% defines the server name.
# -------------------------
# Links Configuration
# -------------------------
LinksTitle: "Server Links"
LINKS:
"Website": "https://www.example.com"
"Store": "https://store.example.com"
"Discord": "https://discord.gg/example"
# "Twitter": "https://twitter.com/example"
# "Add More": "Just follow this format!"
# --------------------------
# Suggestion Configuration
# --------------------------
SuggestionChannel: "suggestions"
SuggestionTitle: "Suggestion"
SuggestionStarter: "What would you like to suggest?"
SuggestReact_1: 👍
SuggestReact_2: 👎
SuggestionMessage_Icon: "USER"
# USER - This will display the user's icon of who joins.
# BOT - This will display the bot's icon when a someone joins.
# CUSTOM - This will allow you to use a custom image, set this below!
SuggestionIcon_URL: "https://imgur.com/example.png"
# ----------------------------
# Announcement Configuration
# ----------------------------
AnnouncementChannel: "announcements"
AnnouncementTitle: "Servername Announcement"
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
AnnouncementStarter: "What would you like to announce?"
# --------------------------
# Moderation Configuration
# --------------------------
ChatLog_Title: "Chat Log"
ChatLogChannel: "chat-logs"
ChatLogColour: "#1BA30C"
ChatLog_Thumbnail: "https://cdn.iconscout.com/icon/free/png-256/chat-2639493-2187526.png"
ChatLogSavedMessage: "📝 **Channel Transcript Saved!**"
BanTitle: "User Banned!"
DaysBannedFor: 7
BanLogColour: "#D911B4"
KickTitle: "User Kicked!"
KickLogColour: "#D9B111"
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
ModLogChannel: "mod-logs"
PruneLogTitle: "Bulk Delete"
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
PruneColour: "#1BA30C"
BlacklistTitle: "Blacklisted User"
BlacklistColour: "#000000"
# --------------------------
# Command Configuration
# --------------------------
# --- User Commands ---
HelpCommand: "help"
LinksCommand: "links"
PingCommand: "ping"
SuggestCommand: "suggest"
# --- Ticket Commands ---
NewTicket: "ticket"
CloseTicket: "close"
AddUser: "add"
RemoveUser: "remove"
RenameTicket: "rename"
# --- Staff/Admin Commands ---
ChatLog: "transcript"
BotSay: "say"
PurgeMessage: "purge"
AnnounceCommand: "announce"
BanUser: "ban"
KickUser: "kick"
BlacklistUser: "blacklist"
# --------------------------
# Messages Configuration
# --------------------------
# --- Command Messages ---
BotSayDesc: "Say something with the bot"
ChatLogDesc: "Get a transcript of a channel"
NewTicketDesc: "Create a new support ticket"
AnnounceDesc: "Create a server announcement"
CloseTicketDesc: "Close your support ticket"
LinksDesc: "View some important links"
PingDesc: "Get the bot's latency"
HelpDesc: "Get a list of all the commands"
RemoveUserDesc: "Remove a user from a support ticket"
AddUserDesc: "Add a user to a support ticket"
SuggestionDesc: "Create a server suggestion"
BanDesc: "Ban a member from this server."
KickDesc: "Kick a member from this server."
PurgeDesc: "Purge messages from the chat."
BlacklistDesc: "Decline a member to open a ticket"
# Error / Warning Messages
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
+8 -8
View File
@@ -1,4 +1,4 @@
// SupportBot Utility
// SupportBot Utils
// Ticket Numbers
const discord = require("discord.js")
@@ -21,14 +21,14 @@ class TicketNumberID {
static get(guildId) {
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
if (!ticketnumberID[guildId]) {
ticketnumberID[guildId] = {
id: 0
}
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
@@ -41,13 +41,13 @@ class TicketNumberID {
}
static set(guildId, value) {
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
ticketnumberID[guildId] = {
id: value
}
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
@@ -55,13 +55,13 @@ class TicketNumberID {
}
static reset(guildId) {
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/tickets.json", "utf8"));
let ticketnumberID = JSON.parse(fs.readFileSync("./storage/TicketID.json", "utf8"));
ticketnumberID[guildId] = {
id: 0
}
fs.writeFileSync("./storage/tickets.json", JSON.stringify(ticketnumberID, null, 4), err => {
fs.writeFileSync("./storage/TicketID.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
@@ -69,4 +69,4 @@ class TicketNumberID {
}
}
module.exports = TicketNumberID;
module.exports = TicketNumberID;