Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Vovex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Levatax
Vovex
Commits
79b048ec
Commit
79b048ec
authored
May 29, 2020
by
Levatax
Browse files
Options
Downloads
Patches
Plain Diff
Update ban.js
parent
0c03bf96
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
commands/ban.js
+18
-14
18 additions, 14 deletions
commands/ban.js
with
18 additions
and
14 deletions
commands/ban.js
+
18
−
14
View file @
79b048ec
const
Discord
=
require
(
'
discord.js
'
);
const
Discord
=
require
(
"
discord.js
"
);
const
client
=
new
Discord
.
Client
();
exports
.
run
=
(
client
,
message
,
args
)
=>
{
let
guild
=
message
.
guild
let
reason
=
args
.
slice
(
1
).
join
(
'
'
);
let
guild
=
message
.
guild
;
let
reason
=
args
.
slice
(
1
).
join
(
"
"
);
let
user
=
message
.
mentions
.
users
.
first
();
if
(
reason
.
length
<
1
)
return
message
.
reply
(
'
Can You Try Again And Write A Reason?
'
);
if
(
message
.
mentions
.
users
.
size
<
1
)
return
message
.
reply
(
'
Can You Mention Who I Will Ban?
'
).
catch
(
console
.
error
);
if
(
!
message
.
guild
.
member
(
user
).
bannable
)
return
message
.
reply
(
'
You Dont Have Permission To Ban This User
'
);
if
(
reason
.
length
<
1
)
return
message
.
reply
(
"
Try again and write a reason.
"
);
if
(
message
.
mentions
.
users
.
size
<
1
)
return
message
.
reply
(
"
No User Mention
"
)
.
catch
(
console
.
error
);
if
(
!
message
.
guild
.
member
(
user
).
bannable
)
return
message
.
reply
(
"
You don't have permission to ban this user
"
);
message
.
guild
.
member
(
user
).
ban
();
message
.
channel
.
send
(
'
The User
'
+
user
+
'
Banned From This Guild. Reason:
'
+
reason
)
message
.
channel
.
send
(
"
User
"
+
user
+
"
banned from this guild. Reason:
"
+
reason
);
};
exports
.
conf
=
{
enabled
:
true
,
guildOnly
:
true
,
...
...
@@ -23,7 +27,7 @@ exports.conf = {
};
exports
.
help
=
{
name
:
'
ban
'
,
description
:
'
Bans User From Guild
'
,
usage
:
'
*ban @user reason
'
name
:
"
ban
"
,
description
:
"
Bans User From Guild
"
,
usage
:
"
*ban @user reason
"
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment