-
-
Notifications
You must be signed in to change notification settings - Fork 562
v13 structure rewrite #689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
52769a3
:truck: Change tree of the event folder
Derpinou 4c1b3cf
:zap: Client class optimization
Derpinou d4f4d3b
:rocket: Add a Database class for managing database cache and methods
Derpinou b03165e
:rocket: Add application command body (test)
Derpinou fec8758
:rocket: Support application commands registering
Derpinou 442252e
:heavy_plus_sign: update opus, rest, discord-api-types, update some d…
Derpinou 1b1d28e
:zap: Clean code & adapt to database changes
Derpinou 1f72bb1
:alembic: Make in comment dbl auto post
Derpinou 9a9099b
:card_file_box: Adding forgotted function
Derpinou 7564e2b
:card_file_box: Performing database related changes.
Derpinou fcd50ac
:fire: Remove aliases (deprecated with / commands)
Derpinou 032566e
:card_file_box: Performing database related changes.
Derpinou 1fe02d7
:bug: Fixing bug from Collection#array() to Collection#toJSON()
Derpinou 26fcabe
:fire: Remove getPrefix() method
Derpinou 031dc55
:bulb: Comment code for dev
Derpinou a58f02e
:heavy_plus_sign: Add MongoDB
Derpinou 1a0b95e
:card_file_box: Performing database related changes.
Derpinou 1367d24
:sparkles: Introducing commands permissions
Derpinou 2c9bc32
:sparkles: Support interaction
Derpinou 1bce623
:sparkles: Add interactionCreate
Derpinou 4c68ad1
:zap: Remove commands
Derpinou bebf0d2
:arrow_up: Upgrading mongoose version
Derpinou cb82340
:rocket: Add interaction support
Derpinou 1febf68
:art: Use power of 10 instead some 0
Derpinou 2d1a77c
:fire: Remove file for create messageCreate file
Derpinou e41101a
:wrench: Changing configuration files.
Derpinou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,34 @@ | ||
| const path = require("path"); | ||
| const {Permissions} = require("discord.js"); | ||
|
|
||
| module.exports = class Command { | ||
| constructor(client, { | ||
| name = null, | ||
| description = false, | ||
| dirname = false, | ||
| enabled = true, | ||
| guildOnly = false, | ||
| aliases = new Array(), | ||
| botPermissions = new Array(), | ||
| memberPermissions = new Array(), | ||
| memberPermissions = [], | ||
| botPermissions = [], | ||
| nsfw = false, | ||
| ownerOnly = false, | ||
| cooldown = 3000 | ||
| cooldown = 3000, | ||
| options = {} | ||
| }) | ||
| { | ||
| const category = (dirname ? dirname.split(path.sep)[parseInt(dirname.split(path.sep).length-1, 10)] : "Other"); | ||
| memberPermissions.forEach((p, i) => { | ||
| memberPermissions[i] = Permissions.FLAGS[p]; | ||
| }); | ||
| const bit = memberPermissions.reduce((a, b) => a | b, 0n).toString(); | ||
| const category = dirname ? dirname.split(path.sep)[dirname.split(path.sep).length - 1] : "Other"; | ||
| this.client = client; | ||
| this.conf = { enabled, guildOnly, memberPermissions, botPermissions, nsfw, ownerOnly, cooldown}; | ||
| this.help = { name, category, aliases }; | ||
| this.conf = { enabled, guildOnly, botPermissions, nsfw, ownerOnly, cooldown}; | ||
| this.help = { name, category }; | ||
| this.applicationCommandBody = {name, description, options, dm_permission: !guildOnly}; | ||
|
|
||
|
|
||
| if (bit !== "0") { | ||
| this.applicationCommandBody["default_member_permissions"] = bit; | ||
| } | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"log" is set by default if the second arg of log() is not specified