Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Rico040/bunny-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico040 committed May 21, 2024
2 parents ea2574a + faf010b commit 7177506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/meow/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meow",
"description": "meow",
"description": "makes you a cat",
"authors": [
{
"name": "Rico040",
Expand Down
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 7177506

Please sign in to comment.