mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
Merge branch 'dev'
This commit is contained in:
commit
1485159a25
10 changed files with 446 additions and 228 deletions
|
@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
|
|
||||||
### Extra included plugins
|
### Extra included plugins
|
||||||
<details>
|
<details>
|
||||||
<summary>151 additional plugins</summary>
|
<summary>149 additional plugins</summary>
|
||||||
|
|
||||||
### All Platforms
|
### All Platforms
|
||||||
- AllCallTimers by MaxHerbold & D3SOX
|
- AllCallTimers by MaxHerbold & D3SOX
|
||||||
|
@ -44,7 +44,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- DecodeBase64 by ThePirateStoner
|
- DecodeBase64 by ThePirateStoner
|
||||||
- DeadMembers by Kyuuhachi
|
- DeadMembers by Kyuuhachi
|
||||||
- Demonstration by Samwich
|
- Demonstration by Samwich
|
||||||
- DisableAnimations by S€th
|
|
||||||
- DisableCameras by Joona
|
- DisableCameras by Joona
|
||||||
- DoNotLeak by Perny
|
- DoNotLeak by Perny
|
||||||
- DontFilterMe by Samwich
|
- DontFilterMe by Samwich
|
||||||
|
@ -66,7 +65,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- GodMode by Tolgchu
|
- GodMode by Tolgchu
|
||||||
- GoodPerson by nin0dev & mantikafasi
|
- GoodPerson by nin0dev & mantikafasi
|
||||||
- GoogleThat by Samwich
|
- GoogleThat by Samwich
|
||||||
- GrammarFix by S€th
|
|
||||||
- HideChatButtons by iamme
|
- HideChatButtons by iamme
|
||||||
- HideMessage by Hanzy
|
- HideMessage by Hanzy
|
||||||
- HideServers by bepvte
|
- HideServers by bepvte
|
||||||
|
@ -188,6 +186,7 @@ MacOS
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
- [CLI](https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux)
|
- [CLI](https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux)
|
||||||
|
- [AUR](https://aur.archlinux.org/packages?O=0&K=equibop)
|
||||||
```shell
|
```shell
|
||||||
sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)"
|
sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)"
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*
|
|
||||||
* Vencord, a modification for Discord's desktop app
|
|
||||||
* Copyright (c) 2022 Vendicated and contributors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { EquicordDevs } from "@utils/constants";
|
|
||||||
import definePlugin from "@utils/types";
|
|
||||||
import { findAll } from "@webpack";
|
|
||||||
|
|
||||||
export default definePlugin({
|
|
||||||
name: "DisableAnimations",
|
|
||||||
description: "Disables most of Discord's animations.",
|
|
||||||
authors: [EquicordDevs.seth],
|
|
||||||
start() {
|
|
||||||
this.springs = findAll(mod => {
|
|
||||||
if (!mod.Globals) return false;
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const spring of this.springs) {
|
|
||||||
spring.Globals.assign({
|
|
||||||
skipAnimation: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.css = document.createElement("style");
|
|
||||||
this.css.innerText = "* { transition: none !important; animation: none !important; }";
|
|
||||||
|
|
||||||
document.head.appendChild(this.css);
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
for (const spring of this.springs) {
|
|
||||||
spring.Globals.assign({
|
|
||||||
skipAnimation: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.css) this.css.remove();
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,98 +0,0 @@
|
||||||
/*
|
|
||||||
* Vencord, a Discord client mod
|
|
||||||
* Copyright (c) 2024 Vendicated and contributors
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import {
|
|
||||||
addPreSendListener,
|
|
||||||
removePreSendListener,
|
|
||||||
SendListener,
|
|
||||||
} from "@api/MessageEvents";
|
|
||||||
import { definePluginSettings } from "@api/Settings";
|
|
||||||
import { EquicordDevs } from "@utils/constants";
|
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
|
||||||
autoCapitalization: {
|
|
||||||
type: OptionType.BOOLEAN,
|
|
||||||
description: "Auto Capitalization to the first letter",
|
|
||||||
},
|
|
||||||
autoPunctuation: {
|
|
||||||
type: OptionType.BOOLEAN,
|
|
||||||
description: "Auto Punctuation at the end of a sentence",
|
|
||||||
},
|
|
||||||
autoWordReplacement: {
|
|
||||||
type: OptionType.BOOLEAN,
|
|
||||||
description: "Auto Capitalizes the first letter",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const getPresend = dictionary => {
|
|
||||||
const presendObject: SendListener = (_, msg) => {
|
|
||||||
msg.content = msg.content.trim();
|
|
||||||
if (!msg.content.includes("```") && /\w/.test(msg.content.charAt(0))) {
|
|
||||||
if (settings.store.autoWordReplacement) {
|
|
||||||
const re = new RegExp(
|
|
||||||
`(^|(?<=[^A-Z0-9]+))(${Object.keys(dictionary)
|
|
||||||
.map(k => k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
|
||||||
.join("|")})((?=[^A-Z0-9]+)|$)`,
|
|
||||||
"gi",
|
|
||||||
);
|
|
||||||
if (re !== null) {
|
|
||||||
msg.content = msg.content.replace(re, match => {
|
|
||||||
return dictionary[match.toLowerCase()] || match;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.store.autoPunctuation) {
|
|
||||||
if (
|
|
||||||
/[A-Z0-9]/i.test(msg.content.charAt(msg.content.length - 1))
|
|
||||||
) {
|
|
||||||
if (
|
|
||||||
!msg.content.startsWith(
|
|
||||||
"http",
|
|
||||||
msg.content.lastIndexOf(" ") + 1,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
msg.content += ".";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure sentences are capitalized after punctuation
|
|
||||||
if (settings.store.autoCapitalization) {
|
|
||||||
msg.content = msg.content.replace(/([.!?])\s*(\w)/g, match =>
|
|
||||||
match.toUpperCase(),
|
|
||||||
);
|
|
||||||
|
|
||||||
// Ensure the first character of the entire message is capitalized
|
|
||||||
if (!msg.content.startsWith("http")) {
|
|
||||||
msg.content =
|
|
||||||
msg.content.charAt(0).toUpperCase() +
|
|
||||||
msg.content.slice(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return presendObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default definePlugin({
|
|
||||||
name: "GrammarFix",
|
|
||||||
description: "Automatic punctuation, capitalization, and word replacement.",
|
|
||||||
authors: [EquicordDevs.seth],
|
|
||||||
dependencies: ["MessageEventsAPI"],
|
|
||||||
settings,
|
|
||||||
async start() {
|
|
||||||
let dictionary = await fetch(
|
|
||||||
"https://raw.githubusercontent.com/wont-stream/dictionary/6b9d2f06a1d89103fb7249f41de4db6811e3d374/index.min.json",
|
|
||||||
);
|
|
||||||
dictionary = await dictionary.json();
|
|
||||||
|
|
||||||
addPreSendListener(getPresend(dictionary));
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
removePreSendListener(getPresend({}));
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -117,7 +117,7 @@ export default definePlugin({
|
||||||
{ // Load menu TOC eagerly
|
{ // Load menu TOC eagerly
|
||||||
find: "#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}",
|
find: "#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await Promise\.all[^};]*?\)\)).*?,(?=\1\(this)/,
|
match: /(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await [^};]*?\)\)).*?,(?=\1\(this)/,
|
||||||
replace: "$&(async ()=>$2)(),"
|
replace: "$&(async ()=>$2)(),"
|
||||||
},
|
},
|
||||||
predicate: () => settings.store.eagerLoad
|
predicate: () => settings.store.eagerLoad
|
||||||
|
|
|
@ -128,7 +128,7 @@ export default definePlugin({
|
||||||
</Forms.FormText>
|
</Forms.FormText>
|
||||||
|
|
||||||
<Forms.FormText className={Margins.top8}>
|
<Forms.FormText className={Margins.top8}>
|
||||||
Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.
|
Only use experiments if you know what you're doing. Equicord is not responsible for any damage caused by enabling experiments.
|
||||||
|
|
||||||
If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know.
|
If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know.
|
||||||
</Forms.FormText>
|
</Forms.FormText>
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
/*
|
|
||||||
* Vencord, a modification for Discord's desktop app
|
|
||||||
* Copyright (c) 2022 Vendicated, Samu and contributors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { ApplicationCommandInputType, findOption, OptionalMessageOption, RequiredMessageOption, sendBotMessage } from "@api/Commands";
|
|
||||||
import { Devs } from "@utils/constants";
|
|
||||||
import definePlugin from "@utils/types";
|
|
||||||
|
|
||||||
|
|
||||||
function mock(input: string): string {
|
|
||||||
let output = "";
|
|
||||||
for (let i = 0; i < input.length; i++) {
|
|
||||||
output += i % 2 ? input[i].toUpperCase() : input[i].toLowerCase();
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default definePlugin({
|
|
||||||
name: "MoreCommands",
|
|
||||||
description: "echo, lenny, mock",
|
|
||||||
authors: [Devs.Arjix, Devs.echo, Devs.Samu],
|
|
||||||
commands: [
|
|
||||||
{
|
|
||||||
name: "echo",
|
|
||||||
description: "Sends a message as Clyde (locally)",
|
|
||||||
options: [OptionalMessageOption],
|
|
||||||
inputType: ApplicationCommandInputType.BOT,
|
|
||||||
execute: (opts, ctx) => {
|
|
||||||
const content = findOption(opts, "message", "");
|
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, { content });
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "lenny",
|
|
||||||
description: "Sends a lenny face",
|
|
||||||
options: [OptionalMessageOption],
|
|
||||||
execute: opts => ({
|
|
||||||
content: findOption(opts, "message", "") + " ( ͡° ͜ʖ ͡°)"
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "mock",
|
|
||||||
description: "mOcK PeOpLe",
|
|
||||||
options: [RequiredMessageOption],
|
|
||||||
execute: opts => ({
|
|
||||||
content: mock(findOption(opts, "message", ""))
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
});
|
|
332
src/plugins/moreCommands/index.tsx
Normal file
332
src/plugins/moreCommands/index.tsx
Normal file
|
@ -0,0 +1,332 @@
|
||||||
|
/*
|
||||||
|
* Vencord, a modification for Discord's desktop app
|
||||||
|
* Copyright (c) 2022 Vendicated, Samu and contributors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, OptionalMessageOption, RequiredMessageOption, sendBotMessage } from "@api/Commands";
|
||||||
|
import { Devs, EquicordDevs } from "@utils/constants";
|
||||||
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
|
|
||||||
|
function mock(input: string): string {
|
||||||
|
let output = "";
|
||||||
|
for (let i = 0; i < input.length; i++) {
|
||||||
|
output += i % 2 ? input[i].toUpperCase() : input[i].toLowerCase();
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default definePlugin({
|
||||||
|
name: "MoreCommands",
|
||||||
|
description: "Echo, Lenny, Mock, and More",
|
||||||
|
authors: [Devs.Arjix, Devs.echo, Devs.Samu, EquicordDevs.ExoDev],
|
||||||
|
commands: [
|
||||||
|
{
|
||||||
|
name: "echo",
|
||||||
|
description: "Sends a message as Clyde (locally)",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
inputType: ApplicationCommandInputType.BOT,
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
const content = findOption(opts, "message", "");
|
||||||
|
|
||||||
|
sendBotMessage(ctx.channel.id, { content });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lenny",
|
||||||
|
description: "Sends a lenny face",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " ( ͡° ͜ʖ ͡°)"
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "mock",
|
||||||
|
description: "mOcK PeOpLe",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: mock(findOption(opts, "message", ""))
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "reverse",
|
||||||
|
description: "Reverses the input message",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "").split("").reverse().join("")
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "uppercase",
|
||||||
|
description: "Converts the message to uppercase",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "").toUpperCase()
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lowercase",
|
||||||
|
description: "Converts the message to lowercase",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "").toLowerCase()
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "wordcount",
|
||||||
|
description: "Counts the number of words in a message",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
inputType: ApplicationCommandInputType.BOT,
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
const message = findOption(opts, "message", "");
|
||||||
|
const wordCount = message.trim().split(/\s+/).length;
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: `The message contains ${wordCount} words.`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ping",
|
||||||
|
description: "Pings the bot to check if it's responding",
|
||||||
|
options: [],
|
||||||
|
inputType: ApplicationCommandInputType.BOT,
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: "Pong!"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "rolldice",
|
||||||
|
description: "Roll a die with the specified number of sides",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => {
|
||||||
|
const sides = parseInt(findOption(opts, "message", "6"));
|
||||||
|
const roll = Math.floor(Math.random() * sides) + 1;
|
||||||
|
return {
|
||||||
|
content: `You rolled a ${roll}!`
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "flipcoin",
|
||||||
|
description: "Flips a coin and returns heads or tails",
|
||||||
|
options: [],
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
const flip = Math.random() < 0.5 ? "Heads" : "Tails";
|
||||||
|
return {
|
||||||
|
content: `The coin landed on: ${flip}`
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ask",
|
||||||
|
description: "Ask a yes/no question and get an answer",
|
||||||
|
options: [RequiredMessageOption],
|
||||||
|
execute: opts => {
|
||||||
|
const question = findOption(opts, "message", "");
|
||||||
|
const responses = [
|
||||||
|
"Yes", "No", "Maybe", "Ask again later", "Definitely not", "It is certain"
|
||||||
|
];
|
||||||
|
const response = responses[Math.floor(Math.random() * responses.length)];
|
||||||
|
return {
|
||||||
|
content: `${question} - ${response}`
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "randomcat",
|
||||||
|
description: "Get a random cat picture",
|
||||||
|
options: [],
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
return (async () => {
|
||||||
|
try {
|
||||||
|
const response = await fetch("https://api.thecatapi.com/v1/images/search");
|
||||||
|
if (!response.ok) throw new Error("Failed to fetch cat image");
|
||||||
|
const data = await response.json();
|
||||||
|
return {
|
||||||
|
content: data[0].url
|
||||||
|
};
|
||||||
|
} catch (err) {
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: "Sorry, couldn't fetch a cat picture right now 😿"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "randomdog",
|
||||||
|
description: "Get a random ddog picture",
|
||||||
|
options: [],
|
||||||
|
execute: (opts, ctx) => {
|
||||||
|
return (async () => {
|
||||||
|
try {
|
||||||
|
const response = await fetch("https://api.thedogapi.com/v1/images/search");
|
||||||
|
if (!response.ok) throw new Error("Failed to fetch dog image");
|
||||||
|
const data = await response.json();
|
||||||
|
return {
|
||||||
|
content: data[0].url
|
||||||
|
};
|
||||||
|
} catch (err) {
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: "Sorry, couldn't fetch a cat picture right now 🐶"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "randomnumber",
|
||||||
|
description: "Generates a random number between two values",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "min",
|
||||||
|
description: "Minimum value",
|
||||||
|
type: ApplicationCommandOptionType.INTEGER,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "max",
|
||||||
|
description: "Maximum value",
|
||||||
|
type: ApplicationCommandOptionType.INTEGER,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
execute: opts => {
|
||||||
|
const min = parseInt(findOption(opts, "min", "0"));
|
||||||
|
const max = parseInt(findOption(opts, "max", "100"));
|
||||||
|
const number = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||||
|
return {
|
||||||
|
content: `Random number between ${min} and ${max}: ${number}`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "countdown",
|
||||||
|
description: "Starts a countdown from a specified number",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "number",
|
||||||
|
description: "Number to countdown from (max 10)",
|
||||||
|
type: ApplicationCommandOptionType.INTEGER,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
inputType: ApplicationCommandInputType.BOT,
|
||||||
|
execute: async (opts, ctx) => {
|
||||||
|
const number = Math.min(parseInt(findOption(opts, "number", "5")), 10);
|
||||||
|
if (isNaN(number) || number < 1) {
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: "Please provide a valid number between 1 and 10!"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: `Starting countdown from ${number}...`
|
||||||
|
});
|
||||||
|
for (let i = number; i >= 0; i--) {
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
|
sendBotMessage(ctx.channel.id, {
|
||||||
|
content: i === 0 ? "🎉 Go! 🎉" : `${i}...`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "choose",
|
||||||
|
description: "Randomly chooses from provided options",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "choices",
|
||||||
|
description: "Comma-separated list of choices",
|
||||||
|
type: ApplicationCommandOptionType.STRING,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
execute: opts => {
|
||||||
|
const choices = findOption(opts, "choices", "").split(",").map(c => c.trim());
|
||||||
|
const choice = choices[Math.floor(Math.random() * choices.length)];
|
||||||
|
return {
|
||||||
|
content: `I choose: ${choice}`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "systeminfo",
|
||||||
|
description: "Shows system information",
|
||||||
|
options: [],
|
||||||
|
execute: async (opts, ctx) => {
|
||||||
|
try {
|
||||||
|
const { userAgent, hardwareConcurrency, onLine, languages } = navigator;
|
||||||
|
const { width, height, colorDepth } = window.screen;
|
||||||
|
const { deviceMemory, connection }: { deviceMemory: any, connection: any; } = navigator as any;
|
||||||
|
const platform = userAgent.includes("Windows") ? "Windows" :
|
||||||
|
userAgent.includes("Mac") ? "MacOS" :
|
||||||
|
userAgent.includes("Linux") ? "Linux" : "Unknown";
|
||||||
|
const isMobile = /Mobile|Android|iPhone/i.test(userAgent);
|
||||||
|
const deviceType = isMobile ? "Mobile" : "Desktop";
|
||||||
|
const browserInfo = userAgent.match(/(?:chrome|firefox|safari|edge|opr)\/?\s*(\d+)/i)?.[0] || "Unknown";
|
||||||
|
const networkInfo = connection ? `${connection.effectiveType || "Unknown"}` : "Unknown";
|
||||||
|
const info = [
|
||||||
|
`> **Platform**: ${platform}`,
|
||||||
|
`> **Device Type**: ${deviceType}`,
|
||||||
|
`> **Browser**: ${browserInfo}`,
|
||||||
|
`> **CPU Cores**: ${hardwareConcurrency || "N/A"}`,
|
||||||
|
`> **Memory**: ${deviceMemory ? `${deviceMemory}GB` : "N/A"}`,
|
||||||
|
`> **Screen**: ${width}x${height} (${colorDepth}bit)`,
|
||||||
|
`> **Languages**: ${languages?.join(", ")}`,
|
||||||
|
`> **Network**: ${networkInfo} (${onLine ? "Online" : "Offline"})`
|
||||||
|
].join("\n");
|
||||||
|
return { content: info };
|
||||||
|
} catch (err) {
|
||||||
|
sendBotMessage(ctx.channel.id, { content: "Failed to fetch system information" });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getUptime",
|
||||||
|
description: "Returns the system uptime",
|
||||||
|
execute: async (opts, ctx) => {
|
||||||
|
const uptime = performance.now() / 1000;
|
||||||
|
const uptimeInfo = `> **System Uptime**: ${Math.floor(uptime / 60)} minutes`;
|
||||||
|
return { content: uptimeInfo };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getTime",
|
||||||
|
description: "Returns the current server time",
|
||||||
|
execute: async (opts, ctx) => {
|
||||||
|
const currentTime = new Date().toLocaleString();
|
||||||
|
return { content: `> **Current Time**: ${currentTime}` };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "getLocation",
|
||||||
|
description: "Returns the user's approximate location based on IP",
|
||||||
|
execute: async (opts, ctx) => {
|
||||||
|
try {
|
||||||
|
const response = await fetch("https://ipapi.co/json/");
|
||||||
|
const data = await response.json();
|
||||||
|
const locationInfo = `> **Country**: ${data.country_name}\n> **Region**: ${data.region}\n> **City**: ${data.city}`;
|
||||||
|
return { content: locationInfo };
|
||||||
|
} catch (err) {
|
||||||
|
sendBotMessage(ctx.channel.id, { content: "Failed to fetch location information" });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
|
@ -17,13 +17,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { findOption, OptionalMessageOption } from "@api/Commands";
|
import { findOption, OptionalMessageOption } from "@api/Commands";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs, EquicordDevs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MoreKaomoji",
|
name: "MoreKaomoji",
|
||||||
description: "Adds more Kaomoji to discord. ヽ(´▽`)/",
|
description: "Adds more Kaomoji to discord. ヽ(´▽`)/",
|
||||||
authors: [Devs.JacobTm],
|
authors: [Devs.JacobTm, EquicordDevs.voidbbg],
|
||||||
commands: [
|
commands: [
|
||||||
{
|
{
|
||||||
name: "dissatisfaction",
|
name: "dissatisfaction",
|
||||||
|
@ -112,6 +112,105 @@ export default definePlugin({
|
||||||
execute: opts => ({
|
execute: opts => ({
|
||||||
content: findOption(opts, "message", "") + " " + "o(≧▽≦)o",
|
content: findOption(opts, "message", "") + " " + "o(≧▽≦)o",
|
||||||
}),
|
}),
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
even more kaomoji
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
name: "giving",
|
||||||
|
description: "(ノ◕ヮ◕)ノ*:・゚✧",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(ノ◕ヮ◕)ノ*:・゚✧",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "peace",
|
||||||
|
description: "✌(◕‿-)✌",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "✌(◕‿-)✌",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ending1",
|
||||||
|
description: "Ꮺ ָ࣪ ۰ ͙⊹",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "Ꮺ ָ࣪ ۰ ͙⊹",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "uwu",
|
||||||
|
description: "(>⩊<)",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(>⩊<)",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "comfy",
|
||||||
|
description: "(─‿‿─)♡",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(─‿‿─)♡",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lovehappy",
|
||||||
|
description: "(*≧ω≦*)",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(*≧ω≦*)",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "loveee",
|
||||||
|
description: "(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "give",
|
||||||
|
description: "(ノ= ⩊ = )ノ",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "(ノ= ⩊ = )ノ",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lovegive",
|
||||||
|
description: "ღゝ◡╹)ノ♡",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "ღゝ◡╹)ノ♡",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "music",
|
||||||
|
description: "( ̄▽ ̄)/♫•¨•.¸¸♪",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "( ̄▽ ̄)/♫•¨•.¸¸♪",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "stars",
|
||||||
|
description: ".𖥔 ݁ ˖๋ ࣭ ⭑",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + ".𖥔 ݁ ˖๋ ࣭ ⭑",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "lovegiving",
|
||||||
|
description: "⸜(。˃ ᵕ ˂ )⸝♡",
|
||||||
|
options: [OptionalMessageOption],
|
||||||
|
execute: opts => ({
|
||||||
|
content: findOption(opts, "message", "") + " " + "⸜(。˃ ᵕ ˂ )⸝♡",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,7 +33,7 @@ interface ColorPickerWithSwatchesProps {
|
||||||
const ColorPicker = findComponentByCodeLazy<ColorPickerProps>("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", ".BACKGROUND_PRIMARY)");
|
const ColorPicker = findComponentByCodeLazy<ColorPickerProps>("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", ".BACKGROUND_PRIMARY)");
|
||||||
const ColorPickerWithSwatches = findExportedComponentLazy<ColorPickerWithSwatchesProps>("ColorPicker", "CustomColorPicker");
|
const ColorPickerWithSwatches = findExportedComponentLazy<ColorPickerWithSwatchesProps>("ColorPicker", "CustomColorPicker");
|
||||||
|
|
||||||
export const requireSettingsMenu = extractAndLoadChunksLazy(['name:"UserSettings"'], /createPromise:.{0,20}Promise\.all\((\[\i\.\i\("?.+?"?\).+?\])\).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/);
|
export const requireSettingsMenu = extractAndLoadChunksLazy(['name:"UserSettings"'], /createPromise:.{0,20}(\i\.\i\("?.+?"?\).*?).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/);
|
||||||
|
|
||||||
const cl = classNameFactory("vc-pindms-modal-");
|
const cl = classNameFactory("vc-pindms-modal-");
|
||||||
|
|
||||||
|
|
|
@ -739,10 +739,6 @@ export const EquicordDevs = Object.freeze({
|
||||||
name: "Prince527",
|
name: "Prince527",
|
||||||
id: 364105797162237952n
|
id: 364105797162237952n
|
||||||
},
|
},
|
||||||
seth: {
|
|
||||||
name: "S€th",
|
|
||||||
id: 1273447359417942128n
|
|
||||||
},
|
|
||||||
ThePirateStoner: {
|
ThePirateStoner: {
|
||||||
name: "ThePirateStoner",
|
name: "ThePirateStoner",
|
||||||
id: 1196220620376121381n
|
id: 1196220620376121381n
|
||||||
|
@ -967,6 +963,14 @@ export const EquicordDevs = Object.freeze({
|
||||||
vappstar: {
|
vappstar: {
|
||||||
name: "vappstar",
|
name: "vappstar",
|
||||||
id: 747192967311261748n
|
id: 747192967311261748n
|
||||||
|
},
|
||||||
|
ExoDev: {
|
||||||
|
name: "ExoDev",
|
||||||
|
id: 1325655837003223137n
|
||||||
|
},
|
||||||
|
voidbbg: {
|
||||||
|
name: "voidbbg",
|
||||||
|
id: 117126234588184582n
|
||||||
}
|
}
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue