Skip to content

Commit

Permalink
Fix eval and mute's timers and mute persists.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Nov 17, 2018
1 parent e432627 commit 95e44fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/bot/commands/admin/mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export const handleMute: Command = {
// Persist the mute.
const guildID = message.member.guild.id
if (!tempDB.mute[guildID]) tempDB.mute[guildID] = []
tempDB.mute[guildID].push(user.id)
if (!tempDB.mute[guildID].includes(user.id)) tempDB.mute[guildID].push(user.id)
// If time given, set timeout.
try {
if (ms(args[0])) {
if (ms(args[0]) && ms(args[0]) <= 2073600000) {
setTimeout(() => {
try {
// Remove the mute persist.
Expand Down
2 changes: 1 addition & 1 deletion server/bot/commands/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const handleEval: Command = {
example: '/eval ```js\nconsole.log(\'ji\')\n```',
requirements: { userIDs: [host] }
},
generator: async (message, args, { client, tempDB, db }) => {
generator: async (message, args, { client, tempDB, db, commandParser }) => {
try {
let toEval = args.join(' ')
if (toEval.startsWith('```js')) toEval = toEval.substring(5)
Expand Down

0 comments on commit 95e44fb

Please sign in to comment.