Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Weasht
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Emir Hamza
Weasht
Commits
3e006513
Commit
3e006513
authored
Jan 18, 2021
by
Reviath
Browse files
Options
Downloads
Patches
Plain Diff
Update commands/unmute.js, commands/mute.js, commands/add-emote.js files
parent
b9e4053f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
commands/add-emote.js
+2
-2
2 additions, 2 deletions
commands/add-emote.js
commands/mute.js
+6
-6
6 additions, 6 deletions
commands/mute.js
commands/unmute.js
+4
-4
4 additions, 4 deletions
commands/unmute.js
with
12 additions
and
12 deletions
commands/add-emote.js
+
2
−
2
View file @
3e006513
...
...
@@ -4,7 +4,7 @@ exports.run = async (client, message, args) => {
var
url
=
""
;
var
name
=
""
;
if
(
!
message
.
member
.
hasPermission
(
"
MANAGE_EMOJIS
"
))
return
[
message
.
channel
.
send
(
`
You must have
\`
MANAGE_EMOJIS
\`
permission to perform this action.
`
)];
return
[
message
.
channel
.
send
(
`
Bu komutu kullanmak için emojileri yönetme yetkisine sahip olmalısın
`
)];
let
emoji
=
args
[
0
];
var
emojiid
=
emoji
.
match
(
/
\d
/g
);
emojiid
=
emojiid
.
join
(
""
);
...
...
@@ -24,7 +24,7 @@ exports.run = async (client, message, args) => {
.
create
(
url
,
name
)
.
then
((
emoji
)
=>
message
.
channel
.
send
(
`
Created new emoji called
\`
${
emoji
.
name
}
\`
. Preview:
${
emoji
}
`
`
\`
${
emoji
.
name
}
\`
isimli emoji oluşturuldu! (
${
emoji
}
)
`
)
)
.
catch
(
console
.
error
);
...
...
This diff is collapsed.
Click to expand it.
commands/mute.js
+
6
−
6
View file @
3e006513
...
...
@@ -5,8 +5,8 @@ exports.run = async(client, message, args) => {
let
spammer
=
message
.
guild
.
member
(
message
.
mentions
.
users
.
first
()
||
message
.
guild
.
members
.
cache
.
get
(
args
[
0
]));
if
(
!
spammer
)
return
message
.
channel
.
send
(
"
Please specify user to perform action upon.
"
);
if
(
!
message
.
member
.
hasPermission
(
"
MANAGE_
MESSAG
ES
"
))
return
message
.
reply
(
"
Lacking permission to perform such action.
"
);
if
(
!
spammer
)
return
message
.
channel
.
send
(
"
Bir üye belirtmelisin
"
);
if
(
!
message
.
member
.
hasPermission
(
"
MANAGE_
ROL
ES
"
))
return
message
.
reply
(
"
Yeterli yetkiye sahip değilsin
"
);
let
role
=
message
.
guild
.
roles
.
cache
.
find
(
r
=>
r
.
name
===
"
Muted
"
);
if
(
!
role
){
...
...
@@ -28,24 +28,24 @@ exports.run = async(client, message, args) => {
}
}
if
(
spammer
.
roles
.
cache
.
has
(
role
.
id
))
return
message
.
channel
.
send
(
'
User is already muted.
'
);
if
(
spammer
.
roles
.
cache
.
has
(
role
.
id
))
return
message
.
channel
.
send
(
'
Bu üye zaten susturulmuş!
'
);
let
time
=
args
[
1
];
if
(
!
time
)
{
time
=
"
24h
"
};
let
reason
=
args
.
slice
(
2
).
join
(
'
'
);
if
(
!
reason
)
{
reason
=
"
Unspecifi
ed
"
reason
=
"
Belirtilm
ed
i
"
}
await
(
spammer
.
roles
.
add
(
role
.
id
));
await
message
.
channel
.
send
(
`
Muted User
: <@
${
spammer
.
id
}
> \n
Duration
:
\`
${
ms
(
ms
(
time
))}
\`
\n
Reason
:
\`
${
reason
}
\`
`
);
await
message
.
channel
.
send
(
`
Susturulan üye
: <@
${
spammer
.
id
}
> \n
Süre
:
\`
${
ms
(
ms
(
time
))}
\`
\n
Sebep
:
\`
${
reason
}
\`
`
);
setTimeout
(
function
()
{
if
(
!
spammer
.
roles
.
cache
.
has
(
role
.
id
))
return
;
spammer
.
roles
.
remove
(
role
.
id
);
message
.
channel
.
send
(
`<@
${
spammer
.
id
}
>
can speak again.
`
);
message
.
channel
.
send
(
`<@
${
spammer
.
id
}
>
tekrar konuşabilir
`
);
},
ms
(
time
));
};
...
...
This diff is collapsed.
Click to expand it.
commands/unmute.js
+
4
−
4
View file @
3e006513
...
...
@@ -9,13 +9,13 @@ exports.run = async(client, message, args, connection) => {
let
role
=
message
.
guild
.
roles
.
cache
.
find
(
r
=>
r
.
name
===
"
Muted
"
);
if
(
!
role
)
return
;
if
(
!
spammer
.
roles
.
cache
.
has
(
role
.
id
))
return
message
.
channel
.
send
(
'
User is not muted.
'
);
if
(
!
spammer
.
roles
.
cache
.
has
(
role
.
id
))
return
message
.
channel
.
send
(
'
Belirtilen kişi mute
\'
lu değil
'
);
spammer
.
roles
.
remove
(
role
.
id
);
message
.
channel
.
send
(
`<@
${
spammer
.
id
}
>
can speak again.
`
);
message
.
channel
.
send
(
`<@
${
spammer
.
id
}
>
Tekrar konuşabilir!
`
);
}
else
{
message
.
channel
.
send
(
`
Lacking permission to perform such action.
`
)
message
.
channel
.
send
(
`
Yeterli yetkin yok
`
)
}
};
...
...
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