Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Koakuma
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
Reviath
Koakuma
Commits
bbb7bda6
Commit
bbb7bda6
authored
Jan 22, 2021
by
Reviath
Browse files
Options
Downloads
Patches
Plain Diff
Update commands/slots.js, commands/roulette.js files
parent
1fe1dc2b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
commands/roulette.js
+10
-4
10 additions, 4 deletions
commands/roulette.js
commands/slots.js
+5
-3
5 additions, 3 deletions
commands/slots.js
with
15 additions
and
7 deletions
commands/roulette.js
+
10
−
4
View file @
bbb7bda6
...
...
@@ -12,6 +12,7 @@ let colour = args[0];
let
money
=
parseInt
(
args
[
1
]);
let
moneydb
=
await
db
.
fetch
(
`Balance_
${
user
.
id
}
`
)
let
random
=
Math
.
floor
(
Math
.
random
()
*
37
);
let
moneyhelp
=
new
Discord
.
MessageEmbed
()
.
setColor
(
'
BLUE
'
)
.
setDescription
(
`<a:x_:801038779955150888> Specify an amount | .roulette <color> <amount>`
);
...
...
@@ -29,34 +30,39 @@ if (colour == "b" || colour.includes("black")) colour = 0;
else
if
(
colour
==
"
r
"
||
colour
.
includes
(
"
red
"
))
colour
=
1
;
else
if
(
colour
==
"
g
"
||
colour
.
includes
(
"
green
"
))
colour
=
2
;
else
return
message
.
channel
.
send
(
colorbad
);
msg
=
await
message
.
channel
.
send
(
`You have placed
${
money
}
to
${
colour
}
`
);
setTimeout
(
async
function
()
{
if
(
random
==
0
&&
colour
==
2
)
{
money
*=
15
db
.
add
(
`Balance_
${
user
.
id
}
`
,
money
)
let
moneyEmbed1
=
new
Discord
.
MessageEmbed
()
.
setColor
(
"
RED
"
)
.
setDescription
(
`<a:green:802056552672002059> You won
${
money
}
coins\n\nMultiplier: 15x`
);
m
essage
.
channel
.
send
(
moneyEmbed1
)
m
sg
.
edit
(
moneyEmbed1
)
}
else
if
(
isOdd
(
random
)
&&
colour
==
1
)
{
money
=
parseInt
(
money
*
1.5
)
db
.
add
(
`Balance_
${
user
.
id
}
`
,
money
)
let
moneyEmbed2
=
new
Discord
.
MessageEmbed
()
.
setColor
(
"
RED
"
)
.
setDescription
(
`<a:red_star:801039507385483306> You won
${
money
}
coins\n\nMultiplier: 1.5x`
);
m
essage
.
channel
.
send
(
moneyEmbed2
)
m
sg
.
edit
(
moneyEmbed2
)
}
else
if
(
!
isOdd
(
random
)
&&
colour
==
0
)
{
money
=
parseInt
(
money
*
2
)
db
.
add
(
`Balance_
${
user
.
id
}
`
,
money
)
let
moneyEmbed3
=
new
Discord
.
MessageEmbed
()
.
setColor
(
"
RED
"
)
.
setDescription
(
`<a:black:802055864890425344> You won
${
money
}
coins\n\nMultiplier: 2x`
);
m
essage
.
channel
.
send
(
moneyEmbed3
)
m
sg
.
edit
(
moneyEmbed3
)
}
else
{
db
.
subtract
(
`Balance_
${
user
.
id
}
`
,
money
)
let
moneyEmbed4
=
new
Discord
.
MessageEmbed
()
.
setColor
(
"
RED
"
)
.
setDescription
(
`<a:x_:801038779955150888> You lost
${
money
}
coins\n\nMultiplier: 0x`
);
m
essage
.
channel
.
send
(
moneyEmbed4
)
m
sg
.
edit
(
moneyEmbed4
)
}
},
5000
)
}
module
.
exports
.
help
=
{
...
...
This diff is collapsed.
Click to expand it.
commands/slots.js
+
5
−
3
View file @
bbb7bda6
...
...
@@ -23,15 +23,16 @@ let slots = ["<a:blue_fire:801857759989465170>", "<a:orange_fire:801858052163895
else
{
cfNumber
=
number
;
};
msg
=
await
message
.
channel
.
send
(
'
Sloting...
'
);
if
(
slots
[
result1
]
===
slots
[
result2
]
&&
slots
[
result1
]
===
slots
[
result3
])
{
setTimeout
(
async
function
()
{
let
embed
=
new
Discord
.
MessageEmbed
()
.
setFooter
(
'
You won!
'
,
icon
)
.
setTitle
(
'
:slot_machine: Slots :slot_machine:
'
)
.
addField
(
'
Result:
'
,
slots
[
result1
]
+
slots
[
result2
]
+
slots
[
result3
],
true
)
.
addField
(
`You won `
,
`
${
cfNumber
*
2
}
`
)
.
setColor
(
0xF4E842
)
m
essage
.
channel
.
send
(
embed
).
then
(
db
.
add
(
`Balance_
${
message
.
author
.
id
}
`
,
cfNumber
));
m
sg
.
edit
(
embed
).
then
(
db
.
add
(
`Balance_
${
message
.
author
.
id
}
`
,
cfNumber
));
}
else
{
let
embed2
=
new
Discord
.
MessageEmbed
()
.
setFooter
(
'
You lost!
'
,
icon
)
...
...
@@ -39,7 +40,8 @@ let slots = ["<a:blue_fire:801857759989465170>", "<a:orange_fire:801858052163895
.
addField
(
'
Result:
'
,
slots
[
result1
]
+
slots
[
result2
]
+
slots
[
result3
],
true
)
.
setColor
(
0xF4E842
)
.
addField
(
`You lost `
,
`
${
cfNumber
}
`
)
message
.
channel
.
send
(
embed2
).
then
(
db
.
subtract
(
`Balance_
${
message
.
author
.
id
}
`
,
cfNumber
));
msg
.
edit
(
embed2
).
then
(
db
.
subtract
(
`Balance_
${
message
.
author
.
id
}
`
,
cfNumber
));
},
5000
)
}
}
module
.
exports
.
help
=
{
...
...
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