Skip to content

Commit

Permalink
change chances a lil bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 authored May 20, 2024
1 parent 9ea4535 commit faf010b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/meow/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getRandomInt(min, max) {

function modify(msg: Message) {
var newContent = msg.content
if (getRandomInt(1,2) === 1 || msg.content.match(hasEmotesRegex)) {
if (getRandomInt(1,4) === 1 || msg.content.match(hasEmotesRegex)) {
newContent = msg.content.replaceAll(/<a?:(\w+):(\d+)>/gi, '🐱');
}
if (getRandomInt(1,8) === 1) {
Expand All @@ -29,7 +29,7 @@ function modify(msg: Message) {
let words = newContent.split(" ")
let randomIndex = Math.floor(Math.random() * words.length);
words.splice(randomIndex, 0, catSounds[Math.floor(Math.random() * catSounds.length)])
if (getRandomInt(1,2) === 1) words[randomIndex] += '~'
if (getRandomInt(1,3) === 1) words[randomIndex] += '~'
newContent = words.join(" ")
if (getRandomInt(1,2) === 1) newContent += '~'
}
Expand All @@ -45,4 +45,4 @@ const unpatchMeowing2 = before("uploadLocalFiles", uploadModule, (args) => modif
export function onUnload() {
unpatchMeowing()
unpatchMeowing2
}
}

0 comments on commit faf010b

Please sign in to comment.