Compare commits

...

189 Commits

Author SHA1 Message Date
lamp d9a1b9b99c disable broken 2022-04-01 23:05:40 -07:00
lamp 6fe26e7837 DEBUG AGAIN FUCK 2022-04-01 22:53:50 -07:00
lamp afc2b10a86 fix bug 2022-04-01 22:32:08 -07:00
lamp 3369bd521d DEBUG BITCH 2022-04-01 22:09:07 -07:00
lamp d52aff9936 ok 2022-04-01 22:03:00 -07:00
lamp a44f81bddf wtff 2022-04-01 21:56:31 -07:00
lamp 2925c3d788 recreate missing channel 2022-04-01 21:45:26 -07:00
lamp 9dcd27c45f wat 2022-04-01 21:04:39 -07:00
lamp e882ee7e57 fix private 2022-04-01 21:04:12 -07:00
lamp 20ecfb3e84 debug 2022-04-01 20:54:03 -07:00
lamp 16f4b7eaf9 fix 2022-04-01 20:53:25 -07:00
lamp 940d3f6c30 show world in 2022-04-01 20:37:44 -07:00
lamp 4252a2f060 fucking env variables 2022-03-31 18:38:00 -07:00
lamp f602638aae fix 2022-03-31 18:11:15 -07:00
lamp c9c45d17e7 need defer 2022-03-31 18:01:55 -07:00
lamp bf27b6519a fix 2022-03-31 17:59:22 -07:00
lamp 085b51a95d fix 2022-03-31 17:57:06 -07:00
lamp fc41f8ad2f a2 2022-03-31 17:55:55 -07:00
lamp d6d05f6a72 vrchat function only 2022-03-31 17:42:15 -07:00
lamp ed76ad6044 small refactor 2022-03-31 17:33:48 -07:00
lamp c0036e7471 fix 2022-03-31 17:28:01 -07:00
lamp 55812d6422 ok.. 2022-03-31 17:04:51 -07:00
lamp 93b40700e0 vrc user monitor 2022-03-31 17:01:08 -07:00
lamp 345e368faa fix 2022-03-31 13:23:12 -07:00
lamp 523f057ea3 enable pinging deactivated members by role 2022-03-31 13:20:46 -07:00
lamp a0a9383d32 undot am pm 2022-03-31 12:27:54 -07:00
lamp 06685d0ad4 phlag 2022-03-19 12:39:35 -07:00
lamp 17d295043f welcome message 2022-03-14 16:43:54 -05:00
lamp e069b80a1d regular pin 2022-03-08 14:23:09 -06:00
lamp a016217a06 update channel ids 2022-03-08 14:13:47 -06:00
lamp 6dcd1b2665 fking discord 2022-01-18 16:26:16 -06:00
lamp 6f369ee441 :sGrimace:
also allow removing role icon
2022-01-13 19:28:15 -08:00
lamp 79611c34ae update discord.js 2022-01-13 19:22:06 -08:00
lamp bec6a886b1 /setbanner 2022-01-13 19:14:04 -08:00
lamp 0cd23ff738 Merge branch 'master' of gitea.moe:lamp/lampdiscordbot 2022-01-10 14:05:01 -08:00
lamp ba8d2f5cb9 fix detection url abuse 2022-01-10 14:04:57 -08:00
lamp fdbf05b846 fix t %% 2022-01-03 21:36:02 -06:00
lamp 25ec6a1906 rename tr to tolang 2022-01-03 16:13:48 -08:00
lamp f73217e282 normalization broke other lang 2022-01-03 16:01:37 -08:00
lamp e0122e5365 fix 2022-01-03 15:56:33 -08:00
lamp 7ccfe95b33 show detected lang if no flag 2022-01-03 15:51:46 -08:00
lamp eb48b90c96 rename to to tr because it can't be used without clicking 2022-01-03 15:44:18 -08:00
lamp f62d629b1f bruh 2022-01-03 15:37:32 -08:00
lamp 2772a16525 d 2022-01-03 15:34:22 -08:00
lamp 502cffbf06 flags 2022-01-03 15:23:54 -08:00
lamp 8fde14112b wrong key :sGrimace: 2022-01-03 14:37:48 -08:00
lamp dd159fa854 max 25 options 2022-01-03 14:34:26 -08:00
lamp dec7d3a50a add /to 2021-12-31 21:25:51 -08:00
lamp 978e08b713 bruh
also update .gitignore
%%
2021-12-23 10:40:25 -08:00
lamp fd9cc47836 un-simplify 2021-12-23 00:27:04 -08:00
lamp 75fa8fce66 bruh 2021-12-22 21:25:51 -08:00
lamp 51691595ce simplified 2021-12-22 21:24:45 -08:00
lamp 3f64f2e8e5 aaaa api message order is reversed 2021-12-22 21:09:23 -08:00
lamp 8db44d917c bug 2021-12-22 20:57:27 -08:00
lamp bb66625541 i test backup.js %% 2021-12-22 20:44:24 -08:00
lamp 81a73d519f add voice deps 2021-12-21 22:57:27 -08:00
lamp b44a3c482e fix bug 2021-12-21 22:48:54 -08:00
lamp b02ac22ab7 incl. t of j %% 2021-12-21 20:31:32 -08:00
lamp bfd9f8be0d not dupe join but handle delete 2021-12-21 20:19:24 -08:00
lamp 54840a409a delete pixiv proxy 2021-12-03 20:29:13 -08:00
lamp a4cbd51dd6 wrong domain drrr 2021-12-03 20:11:01 -08:00
lamp a215a981aa use cloudflare worker pixiv proxy 2021-12-03 20:09:00 -08:00
lamp af43453a84 count cmd 2021-12-03 15:24:54 -08:00
lamp 732a9c1ee7 巡音ルカ%% 2021-12-03 13:49:19 -08:00
lamp 32cc7389e3 save deleted emojis %% 2021-12-03 00:46:23 -08:00
lamp 13fb466144 make pin quote things use attached avatar now that it's possible 2021-12-03 00:39:31 -08:00
lamp 606aa4b72f /avatar user default self 2021-12-03 00:31:42 -08:00
lamp c788a1ff04 wrong user drr 2021-12-03 00:26:55 -08:00
lamp 4fe8f05ce7 f&c 2021-12-03 00:26:05 -08:00
lamp 16a4c78441 avatar command 2021-12-03 00:17:25 -08:00
lamp bc12b7aff8 not ephemeral /archive reply %% 2021-12-02 12:13:54 -08:00
lamp ec6e6e0f60 thing for access archived channls 2021-12-02 12:11:29 -08:00
lamp 028395b9b2 t 2021-12-02 11:59:57 -08:00
lamp 4821faef3b disable message on reactivation 2021-12-02 11:51:53 -08:00
lamp ae1eb37784 Merge branch 'master' of gitea.moe:lamp/lampdiscordbot 2021-12-02 11:49:09 -08:00
lamp 776b6b7b3e delete kanji game 2021-12-02 11:46:44 -08:00
lamp 0e48ee306f delete madlibs 2021-12-02 11:46:27 -08:00
lamp 6f285c730a delete unused magicchannel.js 2021-12-02 11:43:49 -08:00
lamp dbe7bba3fe move msg send out of deactivateMember() 2021-11-19 16:00:21 -06:00
lamp 03378d23df OOP 2021-11-18 17:45:43 -08:00
lamp ba38b60d4e include title in pixiv embed 2021-11-18 17:44:25 -08:00
lamp 5bd4b3da19 ASDF 2021-10-30 13:34:29 -07:00
lamp ecbdfae381 asdfdfghuidfghuisdfg 2021-10-30 13:30:21 -07:00
lamp 2d4426fb5a hmm scope 2021-10-30 13:19:49 -07:00
lamp 71768f7b19 more pixiv subscriptions 2021-10-30 13:14:02 -07:00
lamp 8345cb60f6 fix 2021-10-20 20:56:13 -07:00
lamp fdc52f6a5f systemd auto restart 2021-10-20 20:38:25 -07:00
lamp 3a705d7024 bruh 2021-10-20 20:36:17 -07:00
lamp 39f7dc147c subscribe to pixiv miku 2021-10-20 20:34:06 -07:00
Lamp f8f6844924 fix typo 2021-10-11 15:15:00 -07:00
Lamp 5522d0f81e i stop using docker
%%
2021-10-11 15:09:14 -07:00
lamp 8a9d9b8f15 stupid 2021-10-10 23:05:56 -07:00
lamp 2e1e19bd55 fix path 2021-10-10 23:03:08 -07:00
lamp 493d260d44 "finish" madlibs 2021-10-10 23:01:40 -07:00
lamp 75f455e27f fix command 2021-10-10 22:49:03 -07:00
lamp 7818dd69b1 Required cannot be configured for this type of option 2021-10-10 22:43:35 -07:00
lamp c59b2f88c8 AAAAAAAAAAAAAAAA 2021-10-10 22:39:03 -07:00
lamp 472bee74d6 oops 2021-10-10 22:37:42 -07:00
lamp ae9d4b6517 wip madlibs 2021-10-10 22:37:06 -07:00
lamp cc846ac132 fix and thing 2021-10-10 22:07:15 -07:00
lamp 53f327acdc wip madlibs 2021-10-10 21:28:15 -07:00
lamp 5d6dcbf8c1 add idk 2021-10-10 20:18:45 -07:00
lamp 82d55023b4 fix 2021-10-10 20:10:13 -07:00
lamp 2d9bd9d717 disable kanji game and 2021-10-10 20:04:36 -07:00
lamp 881bd240c0 change format and fix bug 2021-10-10 19:59:58 -07:00
lamp bf532fe639 fix 2021-10-10 19:53:52 -07:00
lamp c21ca1bc81 fix 2021-10-10 19:51:55 -07:00
lamp 430a6b6584 vocabulary game 2021-10-10 19:49:14 -07:00
lamp c7d490334e plug hole
ブーイさんありがとう
2021-10-10 12:03:01 -07:00
lamp e1d5140b28 update pixiv regex 2021-10-05 13:03:22 -07:00
lamp 28fcdf2dc7 change activity timeout to 72 hours 2021-10-05 12:43:43 -07:00
lamp 0fc7ae09df say when reactivate 2021-09-29 15:48:03 -07:00
lamp 1a741833bc FIX!!!! 2021-09-29 15:43:16 -07:00
lamp 69e64d6422 fix 2021-09-29 15:31:59 -07:00
lamp c68e12d965 fix 2021-09-29 15:20:26 -07:00
lamp bb9349bd1a AAA ignore bot 2021-09-29 15:03:03 -07:00
lamp ec51b5d5ec The "data" argument must be of type string or an instance of Buffer, TypedArray, or Da
taView. Received type number
2021-09-29 14:58:24 -07:00
lamp e73bd3af92 fak bug 2021-09-29 14:57:25 -07:00
lamp 171bc65bf4 activitytracker is ready? 2021-09-29 14:56:36 -07:00
lamp 9dd975cf89 ashfuguisdfhglisdhfg wip 2021-09-29 13:38:26 -07:00
lamp 4dc8fb19fb datastore, url reset 2021-09-29 12:38:37 -07:00
lamp bcfd056790 t 2021-09-29 11:55:07 -07:00
lamp 170bb431f5 fix and 2021-09-29 11:44:04 -07:00
lamp 1188883f20 Merge branch 'master' of gitea.moe:lamp/lampdiscordbot 2021-09-29 11:39:01 -07:00
lamp 4fea681a5f magicchannel1 2021-09-29 11:38:46 -07:00
lamp 513a9f76aa fix bug 2021-09-29 02:27:01 -05:00
lamp 5445802fe1 add settitle, make setcolor not ephemeral 2021-09-28 22:58:40 -07:00
lamp 6ddae9982f fix 2021-09-28 22:44:31 -07:00
lamp 2e1e7b2b97 support unicode 2021-09-28 22:39:19 -07:00
lamp 8fa3f489b2 seticon command 2021-09-28 22:23:25 -07:00
lamp d9ae24c8c1 use bleeding edge discord.js pr for role icons that aint even merged yet 2021-09-28 21:38:42 -07:00
lamp 09cb02c622 durr 2021-09-24 20:04:19 -07:00
lamp 4fbde804e2 make translate global command 2021-09-24 20:02:47 -07:00
lamp a5b2280d95 case-insensitive reverse 2021-09-24 19:50:28 -07:00
lamp 8fd6f072ac fix 2021-09-24 19:47:14 -07:00
lamp dd46202817 fix bug 2021-09-24 19:43:14 -07:00
lamp dedfc1e59a hmm 2021-09-24 19:41:12 -07:00
lamp 67fa789c37 separate reverse translation, and romaji for it 2021-09-24 19:39:10 -07:00
lamp cb6134ce35 no edit if not different 2021-09-24 19:28:17 -07:00
lamp eac4015e5e reverse translation 2021-09-24 19:14:49 -07:00
lamp e96e97c846 aasdasdfasdfasdfasf 2021-09-20 15:23:31 -07:00
lamp befc8352f4 pixiv embedder ignore bot 2021-09-20 15:21:22 -07:00
lamp a8f8834095 fix 2021-09-20 13:59:39 -07:00
lamp 94920c469b fukin m bot 2021-09-19 22:02:38 -07:00
lamp 93aeb20fe1 FUCK THIS SHIT 2021-09-19 21:52:52 -07:00
lamp a8d8fafcc6 FUUCK 2021-09-19 21:48:45 -07:00
lamp d3a04a0304 fix 2021-09-19 21:44:13 -07:00
lamp 5b7d8ecdc5 fix 2021-09-19 21:38:00 -07:00
lamp 6909b6fe45 wtf wher fluffy bols go 2021-09-19 21:32:09 -07:00
lamp 6e200cf3af asdf 2021-09-19 21:28:17 -07:00
lamp d732ef2c1b asd 2021-09-19 21:26:08 -07:00
lamp 272a3503a0 Hmm 2021-09-19 21:24:48 -07:00
lamp d7ef17724d custom color 2021-09-19 21:23:17 -07:00
lamp 8d1384cd33 asdfuihasiudfhiuasdhgiusahdlskgd 2021-09-19 20:16:46 -07:00
lamp d225fae91d a 2021-09-19 20:15:55 -07:00
lamp c2c14b461f ASFJGUSADUFISHADFI 2021-09-19 20:12:14 -07:00
lamp 52543c40c1 asd 2021-09-19 20:07:57 -07:00
lamp dd63afbf4c try same command for context menu 2021-09-19 20:07:05 -07:00
lamp d8354cd2de sdfgusdfguilhsdifhgu 2021-09-19 17:42:28 -07:00
lamp 30ec46ff75 asiodfgjio;sdfgiosdgidfg 2021-09-19 17:34:38 -07:00
lamp 9e210dcc09 command to steal emoji 2021-09-19 17:31:52 -07:00
lamp 20d8b65534 make third button blue 2021-09-19 16:51:29 -07:00
lamp f415202f28 adfuigiausldfhliusadfguis %% 2021-09-19 16:49:17 -07:00
lamp ecbb7156a2 i forgot button types 2021-09-19 16:47:22 -07:00
lamp dc0ead189d wait lets allow unvoting also fix 2021-09-19 16:45:34 -07:00
lamp cce2db6a71 fix 2021-09-19 16:42:32 -07:00
lamp 9640abd7bb button thing 2021-09-19 16:41:00 -07:00
lamp dbfdd6525a agaga BaseCommandInteraction not exported in stable yet 2021-09-19 15:37:40 -07:00
lamp 047bdb98da BaseCommandInteraction 2021-09-19 15:19:53 -07:00
lamp f18c7e8b11 oh 2021-09-19 15:12:16 -07:00
lamp 7567c9b98f asdfuasdfuasdfuasdhuashdgusdfghuisdfg 2021-09-19 14:13:45 -07:00
lamp 70f1eeaa03 a 2021-09-17 12:33:30 -07:00
lamp e3a0260e61 oh 2021-09-17 12:27:02 -07:00
lamp 5e29c0422b a 2021-09-17 12:25:48 -07:00
lamp 6230f9f0d1 context menu archive command 2021-09-16 23:47:38 -07:00
lamp bcd51de025 fix bug with dm 2021-09-16 00:02:32 -07:00
lamp 218c9f22e5 mi attachment 2021-09-15 22:49:41 -07:00
lamp 5a94678f8d ki 2021-09-15 22:42:37 -07:00
lamp 4723ef657c mi 2021-09-15 22:29:53 -07:00
lamp 785259166e change clock to hours only because there is a rate limit 2021-09-15 21:40:03 -07:00
lamp 573705066f wait durrr 2021-09-15 20:29:19 -07:00
lamp a2ac1de7c8 hack 2021-09-15 20:28:40 -07:00
lamp 7350f2f7b9 FIX 2021-09-15 20:14:32 -07:00
lamp dbc65a006c world clock 2021-09-15 20:13:47 -07:00
lamp 9ecc7d4d29 without content it just says sending forever 2021-09-15 19:01:50 -07:00
lamp e41db72c22 ashudif 2021-09-15 18:37:39 -07:00
lamp 67e45f3bac finish archive cmd 2021-09-15 18:35:20 -07:00
lamp 6a2d8b4eda move ?. 2021-09-15 18:30:30 -07:00
lamp dc604ff4a9 fix! 2021-09-15 18:27:37 -07:00
28 changed files with 1489 additions and 393 deletions
-3
View File
@@ -1,3 +0,0 @@
node_modules
secrets.env
data
+1
View File
@@ -1,3 +1,4 @@
node_modules
secrets.env
data
tokens.txt
-5
View File
@@ -1,5 +0,0 @@
FROM node:latest
ADD . /app
WORKDIR /app
RUN npm ci
CMD ["node", "index.js"]
+116
View File
@@ -0,0 +1,116 @@
var client = require("./client");
var config = require("./config");
var app = require("./www");
var DataStore = require("./datastore");
var ds = new DataStore("activity");
app.get("/detect/:code", (req, res) => {
res.sendFile(process.cwd() + "/track-image.png");
if (req.headers["user-agent"].includes("Discordbot")) return;
onActivity(ds.get(req.params.code));
ds.del(req.params.code);
});
client.on("messageCreate", async m => m.guildId == config.guild && onActivity(m.author.id));
client.on("interactionCreate", async i => i.guildId == config.guild && onActivity(i.user.id));
client.on("typingStart", async t => t.guild?.id == config.guild && onActivity(t.user.id));
client.on("guildMemberAdd", async m => m.guild.id == config.guild && onActivity(m.user.id));
client.on("messageReactionAdd", async (r, user) => r.message?.guild?.id == config.guild && onActivity(user.id));
client.on("messageReactionRemove", async (r, user) => r.message?.guild?.id == config.guild && onActivity(user.id));
client.on("messageUpdate", async (oldMessage, newMessage) => newMessage.guild?.id == config.guild && (oldMessage.editedAt != newMessage.editedAt) && onActivity(newMessage.author.id));
async function onActivity(user_id) {
if (!user_id) return;
let user = client.users.resolve(user_id);
if (!user || user.bot) return;
ds.put(user_id, Date.now());
if (ds.get(user_id + "deactivated")) {
let member = client.guilds.resolve(config.guild).members.resolve(user_id);
await reactivateMember(member);
/*await client.channels.resolve(config.default_channel)?.send(random([
`${member.displayName} bacc`,
`${member.displayName} is bacc`,
`hi ${member.displayName}`
]));*/
}
}
module.exports.interval = setInterval(async () => {
var guild = client.guilds.resolve(config.guild);
if (!guild) return;
guild.members.cache.filter(m => !m.user.bot).forEach(member => {
let lastActivityTime = ds.get(member.user.id);
if (!lastActivityTime) return;
if (Date.now() - lastActivityTime > 1000*60*60*72) { // if last activity > 72 hours ago
if (!ds.get(member.id + "deactivated"))
deactivateMember(member);
}
});
}, 60*60*1000); // every hour i guess
async function deactivateMember(member) {
await member.roles.add(config.inactive_role);
ds.put(member.id + "deactivated");
ds.put(member.id, Date.now());
var magic_channel = client.channels.resolve(ds.get(member.id + "magicchannelid"));
if (!magic_channel) {
magic_channel = await member.guild.channels.create("inactive", {
permissionOverwrites: [
{
id: member.guild.roles.everyone,
deny: "VIEW_CHANNEL"
},
{
id: client.user,
allow: "VIEW_CHANNEL"
},
{
id: member,
allow: "VIEW_CHANNEL"
}
]
});
ds.put(member.id + "magicchannelid", magic_channel.id);
} else {
magic_channel.permissionOverwrites.edit(member, {"VIEW_CHANNEL": true});
}
var magic_channel_message_id = ds.get(member.id + "magicchannelmessage");
var unique_code = Math.random().toString();
ds.put(unique_code, member.id);
var content = `${config.base_uri}/detect/${unique_code}`;
if (!magic_channel_message_id) {
var magic_channel_message = await magic_channel.send({content});
ds.put(member.id + "magicchannelmessage", magic_channel_message.id)
} else {
await magic_channel.messages.edit(magic_channel_message_id, {content});
}
}
async function reactivateMember(member) {
await member.roles.remove(config.inactive_role);
ds.del(member.id + "deactivated");
var magic_channel = client.channels.resolve(ds.get(member.id + "magicchannelid"));
if (magic_channel) await magic_channel.permissionOverwrites.edit(member, {"VIEW_CHANNEL": false});
}
module.exports.deactivateMember = deactivateMember;
module.exports.reactivateMember = reactivateMember;
client.on("messageCreate", async message => {
if (message.guildId != config.guild) return;
let deactivatedMembersMentionedViaRoles = [...new Set(message.mentions.roles.flatMap(r => r.members).values())].filter(x => ds.get(x.id + "deactivated"));
if (deactivatedMembersMentionedViaRoles.length) {
for (let m of deactivatedMembersMentionedViaRoles) await reactivateMember(m);
await message.reply({content: deactivatedMembersMentionedViaRoles.map(String).join(' '), allowedMentions:{repliedUser: false}});
}
});
+47
View File
@@ -0,0 +1,47 @@
module.exports = class DiscordBackup {
constructor(guild) {
this.guild = guild;
this.data = {};
}
async backupGuild() {
// includes emojis, stickers, roles
this.data.guild = await this.guild.client.api.guilds(this.guild.id).get();
}
async backupMembers() {
this.data.members = await this.guild.client.api.guilds(this.guild.id).members.get({query: {limit: 1000}});
}
async backupChannel(channelId) {
var data = {
channel: await this.guild.client.api.channels[channelId].get(),
messages: []
};
this.data.channels ||= [];
this.data.channels.push(data);
do {
var messages = await this.guild.client.api.channels[channelId].messages.get({query: {
before: messages?.at(-1)?.id, limit: 100
}});
data.messages.push(...messages);
} while (messages.length > 0);
}
async backupEverything() {
await this.backupGuild();
await this.backupMembers();
for (let channelId of this.guild.channels.cache.keys()) {
try {
await this.backupChannel(channelId);
} catch (error) {
console.error(error.stack);
}
}
}
serialize() {
return JSON.stringify(this.data);
}
}
+77
View File
@@ -0,0 +1,77 @@
var client = require("./client");
var config = require("./config");
var fs = require("fs");
var data = fs.existsSync("data/buttonthing.json") ? JSON.parse(fs.readFileSync("data/buttonthing.json", "utf8")) : ({
userVoteMap: {},
votes: {
miku: 0,
teto: 0,
both: 0,
what: 0
}
});
function setVote(user, vote) {
var existingVote = data.userVoteMap[user];
if (vote == existingVote) {
data.votes[existingVote]--;
data.userVoteMap[user] = undefined;
} else {
if (existingVote) data.votes[existingVote]--;
data.votes[vote]++;
data.userVoteMap[user] = vote;
}
fs.writeFileSync("data/buttonthing.json", JSON.stringify(data));
}
var thing = () => ({
content: "Miku or Teto?",
components: [
{
type: "ACTION_ROW",
components: [
{
type: "BUTTON",
label: `Miku (${data.votes.miku})`,
customId: "miku",
style: "SUCCESS",
emoji: "<:MikuSquish:868670741518888961>"
},
{
type: "BUTTON",
label: `Teto (${data.votes.teto})`,
customId: "teto",
style: "DANGER",
emoji: "<:tetodrill2:705605869571801120>"
},
{
type: "BUTTON",
label: `both/idk (${data.votes.both})`,
customId: "both",
style: "PRIMARY",
emoji: "<:squee:707727925587345490>"
},
{
type: "BUTTON",
label: `what/idk (${data.votes.what})`,
customId: "what",
style: "SECONDARY",
emoji: "😕"
}
]
}
]
});
module.exports.init = function(channel = client.channels.resolve(config.announcement_channel)) {
channel.send(thing());
}
client.on("interactionCreate", i => {
if (!Object.keys(data.votes).includes(i.customId)) return;
setVote(i.user.id, i.customId);
i.update(thing());
});
+3 -25
View File
@@ -6,29 +6,7 @@ var client = module.exports = new Discord.Client({
intents: 32767 //all
});
client.on("guildMemberAdd", member => {
if (member.guild.id != config.guild) return;
member.roles.add(member.user.bot ? config.bot_role : config.human_role);
client.channels.resolve(config.default_channel)?.send(random([
`${member.user.username} join`,
`${member.user.username} joined`,
`${member.user.username} appear`,
`${member.user.username.toLowerCase()} here`
]));
client.login(config.token).then(async () => {
console.log("ready");
(await client.channels.fetch(config.bot_channel))?.send('a2');
});
client.on("guildMemberRemove", member => {
if (member.guild.id != config.guild) return;
client.channels.resolve(config.default_channel)?.send(random([
`${member.user.username} left`,
`${member.user.username} disappear`,
`${member.user.username.toLowerCase()} gone`
]));
});
client.on("messageCreate", message => {
message.channel.id == "876010629490683955" && message.startThread({name: "Comments"});
});
client.login(config.token).then(() => console.log("ready"));
+130 -9
View File
@@ -1,37 +1,158 @@
var fetch = require("node-fetch");
var {getAverageColor} = require("fast-average-color-node");
var fs = require("fs");
var Discord = require("discord.js");
var client = require("./client");
var config = require("./config");
var commands = require("./commands");
function getColorRoleFor(user_id) {
try {
return client.guilds.resolve(config.guild)?.roles.fetch(
fs.readFileSync(config.data_dir + "color/" + user_id, "utf8")
);
} catch (e) {}
}
module.exports.getColorRoleFor = getColorRoleFor;
client.on("guildMemberAdd", async function (member) {
member.roles.add(await member.guild.roles.create({
if (member.guild.id != config.guild) return;
var role = await member.guild.roles.create({
name: member.user.username,
color: await user2color(member.user) || "#FF0000",
mentionable: true,
permissions: 0n
}));
});
member.roles.add(role);
fs.writeFileSync(config.data_dir + "color/" + member.id, role.id);
});
client.on("userUpdate", async function (oldUser, user) {
var colorRole = client.guilds.resolve(config.guild)?.members.resolve(user)?.roles.color;
var colorRole = await getColorRoleFor(user.id);
if (!colorRole) return;
if (oldUser.username != user.username) await colorRole.setName(user.username);
if (oldUser.username != user.username)
if (!fs.existsSync(`${config.data_dir}color/${user.id}_custom-name`))
await colorRole.setName(user.username);
if (oldUser.avatar != user.avatar) {
if (fs.existsSync(`${config.data_dir}color/${user.id}_custom`)) return;
let c = await user2color(user);
await colorRole.setColor(c);
if (!colorRole.color) {
console.warn("role color set fail:", colorRole.name, c);
await colorRole.setColor("#FF0000");
}
}
});
client.on("guildMemberRemove", async function (member) {
var colorRole = member.roles.color;
if (member.guild.id != config.guild) return;
var colorRole = await getColorRoleFor(member.user.id);
if (!colorRole) return;
if (!colorRole.members.size) colorRole.delete();
});
commands.push({
name: "setcolor",
description: "Set yourself to a custom color",
options: [
{
name: "color",
description: "Hex string or color name.",
type: "STRING",
required: true
}
],
exec: async i => {
var colorRole = await getColorRoleFor(i.user.id);
if (!colorRole) return void i.reply({content: "You don't have color role!"});
let x = i.options.getString("color");
if (x) {
// if (/^[a-zA-Z_]+$/.test(x))
x = x.toUpperCase();
// else if (!/^#?[a-fA-F0-9]{6}$/.test(x)) {
// let m = x.match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);
// if (m) x = [Number(x[1]), Number(x[2]), Number(x[3])];
// }
}
try {
await colorRole.setColor(x);
} catch(error) {
return void await i.reply({content: error.message});
}
fs.writeFileSync(`${config.data_dir}color/${i.user.id}_custom`, '');
await i.reply({content: colorRole.toString()});
}
});
commands.push({
name: "settitle",
description: "Change your color role name",
options: [
{
name: "name",
description: "Name of role",
type: "STRING",
required: true
}
],
exec: async i => {
var colorRole = await getColorRoleFor(i.user.id);
if (!colorRole) return void i.reply({content: "You don't have color role!"});
try {
await colorRole.setName(i.options.getString("name"));
} catch(error) {
await i.reply({content: error.message});
return;
}
fs.writeFileSync(`${config.data_dir}color/${i.user.id}_custom-name`, '');
await i.reply({content: colorRole.toString()});
}
});
commands.push({
name: "seticon",
description: "Set your role icon",
options: [
{
name: "icon",
description: "Image URL or an emoji",
type: "STRING"
}
],
exec: async i => {
await i.deferReply();
var colorRole = await getColorRoleFor(i.user.id);
if (!colorRole) return void i.editReply({content: "You don't have color role!"});
try {
let icon = i.options.getString("icon");
if (/^https?:\/\//i.test(icon)) {
await colorRole.setIcon(icon);
await i.editReply({files: [{
attachment: icon,
name: icon.match(/\/(\w*(?:\.png|\.jpg|\.jpeg|\.gif|\.webp))$/i)?.[1] || "icon.png"
}]});
} else if (icon) {
var emoji = Discord.Util.parseEmoji(icon);
if (emoji?.id) {
await colorRole.setIcon(i.client.rest.cdn.Emoji(emoji.id, emoji.animated ? 'gif' : 'png'));
} else {
await colorRole.setUnicodeEmoji(icon);
}
await i.editReply({content: icon});
} else {
await colorRole.setIcon(null);
await i.editReply({content: "icon removed"});
}
} catch (error) {
await i.editReply({content: error.message});
}
}
});
async function user2color(user) {
var avatarURL = user.avatarURL({format:'png', size: 16}) || user.defaultAvatarURL;
var image = await (await fetch(avatarURL)).buffer();
+106 -7
View File
@@ -1,5 +1,7 @@
var client = require("./client");
var config = require("./config");
var Discord = require("discord.js");
var BaseCommandInteraction = require("discord.js/src/structures/BaseCommandInteraction.js")
var commands = module.exports = [
{
@@ -43,7 +45,8 @@ var commands = module.exports = [
{
name: "channel",
description: "channel",
type: "CHANNEL"
type: "CHANNEL",
required: true
}
],
defaultPermission: false,
@@ -53,24 +56,120 @@ var commands = module.exports = [
type: "ROLE",
permission: true
}
]
],
exec: async i => {
let channel = i.options.getChannel("channel");
await channel.setParent(config.archive_category);
await channel.lockPermissions();
await i.reply({content: channel.toString()});
}
},
{
name: "avatar",
description: "View a user's original avatar (and save permanently as attachment)",
options: [
{
name: "user",
description: "can i not leave some obvious descriptions blank?",
type: "USER"
}
],
exec: async i => {
var user = i.options.getUser("user") || i.user;
var au = user.avatarURL({size:4096, dynamic: true});
var an = au.split('/').pop(); an = an.substring(0, an.indexOf('?'));
i.reply({files: [{attachment: au, name: an}], embeds: [{
title: `Avatar for ${user.tag}`,
url: au,
image: {url: `attachment://${an}`},
color: (await require('./colors').getColorRoleFor(user.id)).color
}]});
}
},
{
name: "steal",
description: "Copy an emoji to this server",
options: [
{
name: "emoji",
description: "The emoji to steal",
type: "STRING",
required: true
},
{
name: "name",
description: "Optional rename of stolen emoji",
type: "STRING",
required: false
}
],
exec: async i => {
await i.deferReply();
try {
var input = i.options.getString("emoji") || (await i.channel.messages.fetch(i.targetId))?.content;
var emoji = Discord.Util.parseEmoji(input);
if (!emoji.id || !emoji.name) return void await i.editReply({content: `Invalid emoji input: ${input}`});
var url = client.rest.cdn.Emoji(emoji.id, emoji.animated ? 'gif' : 'png');
var emoji2 = await i.guild.emojis.create(url, i.options.getString("name") || emoji.name);
await i.editReply({content: emoji2.toString()});
} catch (error) {
await i.editReply({content: error.message});
}
}
},
{
name: "Steal Emoji",
type: "MESSAGE",
exec: i => commands.find(x => x.name == "steal").exec(i)
},
{
name: "setbanner",
description: "Set the server banner image",
options: [
{
name: "url",
description: "HTTP(S) URL to an image",
type: "STRING"
}
],
exec: async i => {
var url = i.options.getString("url");
try {
if (!url) {
await i.guild.setBanner(null);
await i.reply("cleared the server banner");
} else {
if (/^https?:\/\//i.test(url)) {
await i.guild.setBanner(url);
await i.reply(url);
} else {
await i.reply("http image url only!");
}
}
} catch (error) {
await i.reply(error.message);
}
}
}
];
client.on("interactionCreate", interaction => {
if (interaction.isCommand())
commands.find(x => x.name == interaction.commandName)?.exec(interaction);
if (interaction instanceof BaseCommandInteraction)
commands.find(x => x.name == interaction.commandName)?.exec?.(interaction);
});
client.once("ready", async () => {
let global_commands = commands.filter(x => x.global);
let guild_commands = commands.filter(x => !x.global);
let guild = client.guilds.resolve(config.guild);
await guild.commands.set(commands);
await guild.commands.set(guild_commands);
await guild.commands.permissions.set({
fullPermissions: commands.map(local_command => {
fullPermissions: guild_commands.map(local_command => {
let discord_command = guild.commands.cache.find(discord_command => local_command.name == discord_command.name);
return {
id: discord_command.id,
permissions: local_command.permissions
permissions: local_command.permissions || []
}
})
});
await client.application.commands.set(global_commands);
});
+66 -4
View File
@@ -7,13 +7,75 @@ module.exports = {
admin_role: "776899554603565116",
human_role: "672956630962274306",
bot_role: "673671040010027034",
inactive_role: "892869309603389500",
view_archived_channels_role: "916056534402863125",
eval_undefined_emoji: "707729833601531935",
default_channel: "672956424162115586",
bot_channel: "782353314137505793",
mi_emoji: "887931046086185060",
ki_emoji: "887935846710394910",
default_channel: "949831184957980722",
bot_channel: "949831221981097984",
archive_channel: "802280618636869663",
moe_channel: "871864787213111366",
porn_channel: "835734868427669574",
porn_channel: "949831237927862333",
announcement_channel: "876010629490683955",
miku_channel: "900583427483516938",
archive_category: "887838689533771776",
archive_portal_voice_channel: "916057450313023508",
data_dir: process.cwd() + "/data/",
web_hostname: "ldb.owo69.me",
base_uri: "https://ldb.owo69.me",
world_clock: [
{
flag: "🇺🇸",
timezone: "America/Los_Angeles",
channel: "887897732428226660"
},
{
flag: "🇺🇸",
timezone: "America/New_York",
channel: "888507872932143155"
},
{
flag: "🇩🇪",
timezone: "Europe/Berlin",
channel: "887897886879281203"
},
{
flag: "🇷🇺",
timezone: "Europe/Moscow",
channel: "887897904738599002"
},
{
flag: "🇵🇭",
timezone: "Asia/Manila",
channel: "888505937315389451"
},
{
flag: "🇯🇵",
timezone: "Asia/Tokyo",
channel: "887897753198419999"
}
],
pixiv_subscriptions: [
{
tag: "初音ミク",
channel: "900583427483516938"
},
{
tag: "鏡音リン",
channel: "904093976615849996"
},
{
tag: "重音テト",
channel: "904093991224627270"
},
{
tag: "巡音ルカ",
channel: "916444961958928394"
}
],
vrchat_status_category: "959236139913445376",
vrchat_configuration: {
username: process.env.VRCHAT_USERNAME,
password: process.env.VRCHAT_PASSWORD
}
}
+25
View File
@@ -0,0 +1,25 @@
var commands = require("./commands");
var app = require("./www");
var config = require("./config");
var mediaProxyUAs = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
];
var img = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAACMAAAAhCAYAAABTERJSAAACpUlEQVRYCa2XvW7bQAzH6SRApyJAkSHwlqHoJHSNgSx+lQx9iD5AH6KDX0VLAHctNHboFmQoCnTs0Kb40yJL8cg7WY4A43Q8fvxM8k7Sik64rq/ePtfMn358W9XW/dqFF7TmFuBxuKPV9S40eX66p3VHCjsHbDa5QDx+viTadCFAKtwPtP7wi5drULNgALIIwtONUBlQE+bFQASsAlSFURAi2n78K+507D+dHV8yWCdAKYyCbDrabr8qQHSzCCoAOoucWxC7jqB9//7wQ1bGK8qarKXjpiP0IWKJTpgZhhnuRCcf94OWD5BLrnX3QNLQBUyWFdTZZmBRaSJaU6740AvOEQsCn5j3feSdwh5LM8exHtjR/8LHfo+WZs0OebYmQSYwWiJZPWHkMgb2EZA08gSGbYMSQe6d+7nEld3myxr5EBt5vJQ9sx/ig2zTpT2iTls3mQ/EJKISxjm0aU2b0NksnZZlMp4Awmk3B5xZrt76Mvp5ZBxnZjxT1AH3Uf2RUDjPSuIVxxJBHMLwGdJ6CLpDUGLwH0g2gehkY1Gm319+HnStQ0MvjqLdgjXIbZ+JfjiOfiXmJDN4Rtzs8CI1ZYwCh82cZKsGgrWb3Tk/nyYwOPTeXb2Otzb+deNVAo5DSE8TZBoqCqOnry3P6GRugCiDngMPXHsdSnTOIoapgVjD6n1rxzkI8SUlwvziZBDTJ0UGEwABsVlhGF4ISiMGdsx6Rs+jRnDrCyA2K1jTnrGK2b3+c38oZgaJPAKB6nQPJ8aFeGYmCzsiykCge1RmYJCVKgrsZTUQ6B4yc0StUSrtER8tmQMCn7e+R7w6v5Av2VF4q/9+/4de3b7xPnkuWZBF+QKQeTTq1wGAoND8pjZv82ITOYZsDoC1VRgRtgIsCSK+W+M/mSFEURCM3rAAAAAASUVORK5CYII=","base64");
commands.push({
name: "count",
description: "Estimate how many clients are looking at the channel",
exec: async i => {
var count = 0;
var route = `/tmp/${Math.random()}`;
app.get(route, (req, res) => {
if (mediaProxyUAs.includes(req.headers["user-agent"])) count++;
res.type("png").send(img);
});
await i.reply(config.base_uri + route);
await new Promise(r => setTimeout(r, 1000));
await i.editReply(`It appears there might be **${count}** clients viewing this channel right now.`);
}
});
+31
View File
@@ -0,0 +1,31 @@
var fs = require("fs");
var config = require("./config");
module.exports = class DataStore {
constructor(id) {
if (id.includes('/')) throw new Error("NO");
this.dir = `${config.data_dir}/${id}/`;
if (!fs.existsSync(this.dir)) fs.mkdirSync(this.dir);
}
get(key) {
if (key.includes('/')) throw new Error("NO");
try {
return fs.readFileSync(this.dir + key, "utf8") || true;
} catch (error) {
if (error.code == "ENOENT") return false;
else throw error;
}
}
put(key, value) {
if (key.includes('/')) throw new Error("NO");
return fs.writeFileSync(this.dir + key, String(value) || '');
}
del(key) {
if (key.includes('/')) throw new Error("NO");
try {
return fs.unlinkSync(this.dir + key);
} catch (error) {
if (error.code != "ENOENT") throw error;
}
}
}
+76
View File
@@ -0,0 +1,76 @@
var client = require("./client.js");
var config = require("./config");
client.on("guildMemberAdd", member => {
if (member.guild.id != config.guild) return;
// add role
member.roles.add(member.user.bot ? config.bot_role : config.human_role);
// welcome message
client.channels.resolve(config.default_channel)?.send(
`Welcome ${member}. Please tell from where you entered this server and some other info about yourself in order to gain access to message history.`
);
});
// join message
/*client.on("messageDelete", message => {
if (message.channel.id != config.default_channel) return;
if (message.type != "GUILD_MEMBER_JOIN") return;
client.channels.resolve(config.default_channel)?.send(
`sussy baka ${message.author} deleted their join message ||(from <t:${Math.floor(message.createdAt.valueOf()/1000)}>)||`
);
});*/
client.on("guildMemberRemove", member => {
if (member.guild.id != config.guild) return;
// leave message
client.channels.resolve(config.default_channel)?.send(random([
`${member.user.username} left`,
`${member.user.username} disappeared`,
`${member.user.username.toLowerCase()} is gone`
]));
});
client.on("messageCreate", message => {
// comment thread on announcements
message.channel.id == config.announcement_channel && message.startThread({name: "Comments"});
// stupid m bot
message.author.id == "732072478519722096" && message.content.endsWith("is bad letter m is much better") && message.delete();
});
// add reactions to video and audio
{
let a = async m => {
if (m.guild?.id != config.guild) return;
if ((m.embeds.some(e => e.type == "video") || m.attachments.some(a => a.contentType?.startsWith('video'))) && !m.g) {
m.g = true;
m.react(config.mi_emoji);
}
if (m.attachments.some(a => a.contentType?.startsWith('audio')) && !m.d) {
m.d = true;
m.react(config.ki_emoji);
}
}
client.on("messageCreate", a);
client.on("messageUpdate", (r, q) => a(q));
}
// thing to access archived channels
client.on("voiceStateUpdate", (oldState, newState) => {
if (newState.guild.id != config.guild) return;
if (oldState.channelId != config.archive_portal_voice_channel && newState.channelId == config.archive_portal_voice_channel) {
// join
newState.member?.roles.add(config.view_archived_channels_role);
} else if (oldState.channelId == config.archive_portal_voice_channel && newState.channelId != config.archive_portal_voice_channel) {
// leave
newState.member?.roles.remove(config.view_archived_channels_role);
}
});
// save deleted emojis
client.on("emojiDelete", emoji => {
client.channels.resolve(config.bot_channel)?.send({
content: "emoji deleted",
files: [{attachment: emoji.url, name: `${emoji.name}.${emoji.url.split('.').pop()}`}]
});
});
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
cd `dirname "$0"`
docker stop ldb
docker rm ldb
docker build --no-cache -t ledlamp/lampdiscordbot .
docker run -d --name ldb --restart=unless-stopped -p 127.0.0.1:9251:9251 --env-file=secrets.env -v /srv/ldb/data:/app/data ledlamp/lampdiscordbot
+1
View File
@@ -4,6 +4,7 @@ var Discord = require("discord.js");
client.on("messageCreate", async function (message) {
if (message.author.id == client.user.id) return;
if (!message.member?.roles.cache.has(config.admin_role)) return;
if (message.content.startsWith("!>")) {
with (message) {
+2 -9
View File
@@ -2,12 +2,5 @@ process.on("unhandledRejection", error => {
console.error("Unhandled Rejection:\n" + error.stack);
});
require("./util"); // global variables set in here
require("./client");
require('./eval-exec');
require('./colors');
require('./www');
require('./pinboard');
require('./pixiv-embedder');
require('./漢字ゲーム');
require('./translate2');
require("dotenv").config();
require("./vrchat");
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=Bot for Lamp Discord Server
After=network.target
[Service]
User=ldb
Group=ldb
WorkingDirectory=/srv/ldb
EnvironmentFile=/srv/ldb/secrets.env
ExecStart=node index.js
Restart=on-success
[Install]
WantedBy=multi-user.target
+424 -209
View File
@@ -5,13 +5,17 @@
"packages": {
"": {
"dependencies": {
"@discordjs/voice": "^0.7.5",
"deepl": "^1.0.12",
"discord.js": "^13.1.0",
"discord.js": "^13.6.0",
"dotenv": "^16.0.0",
"express": "^4.17.1",
"fast-average-color-node": "^1.0.3",
"kuroshiro": "^1.2.0",
"kuroshiro-analyzer-kuromoji": "^1.1.0",
"node-fetch": "^2.6.1"
"libsodium-wrappers": "^0.7.9",
"node-fetch": "^2.6.1",
"vrchat": "^1.6.9"
}
},
"node_modules/@babel/runtime": {
@@ -26,40 +30,53 @@
}
},
"node_modules/@discordjs/builders": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.5.0.tgz",
"integrity": "sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==",
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
"integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
"dependencies": {
"@sindresorhus/is": "^4.0.1",
"discord-api-types": "^0.22.0",
"ow": "^0.27.0",
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.26.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.0"
"tslib": "^2.3.1",
"zod": "^3.11.6"
},
"engines": {
"node": ">=14.0.0",
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/collection": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz",
"integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==",
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
"integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==",
"engines": {
"node": ">=14.0.0"
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"node_modules/@discordjs/voice": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.7.5.tgz",
"integrity": "sha512-lUk+CmIXNKslT6DkC9IF9rpsqhzlTiedauUCPBzepjd4XWxwBZiyVIzR6QpbAirxkAwCoAbbje+3Ho71PGLEAw==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"prism-media": "^1.3.2",
"tiny-typed-emitter": "^2.1.0",
"tslib": "^2.3.1",
"ws": "^8.2.3"
},
"engines": {
"node": ">= 6"
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/voice/node_modules/discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==",
"engines": {
"node": ">=12"
}
},
"node_modules/@mapbox/node-pre-gyp": {
@@ -82,18 +99,18 @@
}
},
"node_modules/@sapphire/async-queue": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz",
"integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==",
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==",
"engines": {
"node": ">=14",
"npm": ">=6"
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@sindresorhus/is": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz",
"integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.1.tgz",
"integrity": "sha512-BrzrgtaqEre0qfvI8sMTaEvx+bayuhPmfe2rfeUGPPHYr/PLxCOqkOe4TQTDPb+qcqgNcsAtXV/Ew74mcDIE8w==",
"engines": {
"node": ">=10"
},
@@ -106,10 +123,37 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz",
"integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw=="
},
"node_modules/@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
}
},
"node_modules/@types/node-fetch/node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/@types/tough-cookie": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz",
"integrity": "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg=="
},
"node_modules/@types/ws": {
"version": "7.4.7",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"dependencies": {
"@types/node": "*"
}
@@ -190,6 +234,23 @@
"follow-redirects": "^1.14.0"
}
},
"node_modules/axios-cookiejar-support": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-1.0.1.tgz",
"integrity": "sha512-IZJxnAJ99XxiLqNeMOqrPbfR7fRyIfaoSLdPUf4AMQEGkH8URs0ghJK/xtqBsD+KsSr3pKl4DEQjCn834pHMig==",
"dependencies": {
"is-redirect": "^1.0.0",
"pify": "^5.0.0"
},
"engines": {
"node": ">= 10.0.0"
},
"peerDependencies": {
"@types/tough-cookie": ">=2.3.3",
"axios": ">=0.16.2",
"tough-cookie": ">=2.3.3"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -245,14 +306,6 @@
"node": ">= 0.8"
}
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/canvas": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz",
@@ -415,44 +468,39 @@
}
},
"node_modules/discord-api-types": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
"integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==",
"engines": {
"node": ">=12"
}
},
"node_modules/discord.js": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz",
"integrity": "sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==",
"version": "13.6.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
"integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
"dependencies": {
"@discordjs/builders": "^0.5.0",
"@discordjs/collection": "^0.2.1",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.4",
"@types/ws": "^7.4.7",
"discord-api-types": "^0.22.0",
"@discordjs/builders": "^0.11.0",
"@discordjs/collection": "^0.4.0",
"@sapphire/async-queue": "^1.1.9",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.2",
"discord-api-types": "^0.26.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
"ws": "^7.5.1"
"ws": "^8.4.0"
},
"engines": {
"node": ">=16.6.0",
"npm": ">=7.0.0"
}
},
"node_modules/dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"dependencies": {
"is-obj": "^2.0.0"
},
"node_modules/dotenv": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz",
"integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
"node": ">=12"
}
},
"node_modules/doublearray": {
@@ -590,9 +638,9 @@
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/follow-redirects": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
"integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==",
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==",
"funding": [
{
"type": "individual",
@@ -608,6 +656,19 @@
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -755,12 +816,12 @@
"node": ">=0.10.0"
}
},
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"node_modules/is-redirect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
"engines": {
"node": ">=8"
"node": ">=0.10.0"
}
},
"node_modules/isarray": {
@@ -797,16 +858,24 @@
"kuromoji": "^0.1.1"
}
},
"node_modules/libsodium": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz",
"integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A=="
},
"node_modules/libsodium-wrappers": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz",
"integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==",
"dependencies": {
"libsodium": "^0.7.0"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -1033,25 +1102,6 @@
"wrappy": "1"
}
},
"node_modules/ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"dependencies": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -1073,6 +1123,42 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"node_modules/pify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz",
"integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/prism-media": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.2.tgz",
"integrity": "sha512-L6UsGHcT6i4wrQhFF1aPK+MNYgjRqR2tUoIqEY+CG1NqVkMjPRKzS37j9f8GiYPlD6wG9ruBj+q5Ax+bH8Ik1g==",
"peerDependencies": {
"@discordjs/opus": "^0.5.0",
"ffmpeg-static": "^4.2.7 || ^3.0.0 || ^2.4.0",
"node-opus": "^0.3.3",
"opusscript": "^0.0.8"
},
"peerDependenciesMeta": {
"@discordjs/opus": {
"optional": true
},
"ffmpeg-static": {
"optional": true
},
"node-opus": {
"optional": true
},
"opusscript": {
"optional": true
}
}
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -1090,6 +1176,19 @@
"node": ">= 0.10"
}
},
"node_modules/psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"engines": {
"node": ">=6"
}
},
"node_modules/qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@@ -1341,6 +1440,11 @@
"node": ">= 10"
}
},
"node_modules/tiny-typed-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz",
"integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA=="
},
"node_modules/toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
@@ -1349,6 +1453,19 @@
"node": ">=0.6"
}
},
"node_modules/tough-cookie": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.1.2"
},
"engines": {
"node": ">=6"
}
},
"node_modules/ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
@@ -1359,17 +1476,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -1382,6 +1488,14 @@
"node": ">= 0.6"
}
},
"node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -1403,14 +1517,6 @@
"node": ">= 0.4.0"
}
},
"node_modules/vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -1419,6 +1525,17 @@
"node": ">= 0.8"
}
},
"node_modules/vrchat": {
"version": "1.6.9",
"resolved": "https://registry.npmjs.org/vrchat/-/vrchat-1.6.9.tgz",
"integrity": "sha512-eV3EzHtObBGIzb5tEOP6vqeZsGIlMLXybO2CwpkSDvGra2ORIoh5hYnUq9JeMnAsmwF/xMpPHrb5yg5ZPDhAoA==",
"dependencies": {
"@types/tough-cookie": "^4.0.1",
"axios": "^0.21.4",
"axios-cookiejar-support": "^1.0.1",
"tough-cookie": "^4.0.0"
}
},
"node_modules/wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
@@ -1433,11 +1550,11 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/ws": {
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.2.tgz",
"integrity": "sha512-lkF7AWRicoB9mAgjeKbGqVUekLnSNO4VjKVnuPHpQeOxZOErX6BPXwJk70nFslRCEEA8EVW7ZjKwXaP9N+1sKQ==",
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.4.1.tgz",
"integrity": "sha512-6eqQ4yN2y2xv8b+BgbkUzPPyfo/PDl3VOWb06ZE0jIFYwuHMsMQN6F7o84yxJYCblfCRAxzpU59We4Rr4w0Luw==",
"engines": {
"node": ">=8.3.0"
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
@@ -1464,6 +1581,14 @@
"engines": {
"node": "*"
}
},
"node_modules/zod": {
"version": "3.11.6",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.11.6.tgz",
"integrity": "sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
},
"dependencies": {
@@ -1476,30 +1601,40 @@
}
},
"@discordjs/builders": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.5.0.tgz",
"integrity": "sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==",
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz",
"integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==",
"requires": {
"@sindresorhus/is": "^4.0.1",
"discord-api-types": "^0.22.0",
"ow": "^0.27.0",
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.26.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.0"
"tslib": "^2.3.1",
"zod": "^3.11.6"
}
},
"@discordjs/collection": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz",
"integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog=="
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz",
"integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw=="
},
"@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"@discordjs/voice": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.7.5.tgz",
"integrity": "sha512-lUk+CmIXNKslT6DkC9IF9rpsqhzlTiedauUCPBzepjd4XWxwBZiyVIzR6QpbAirxkAwCoAbbje+3Ho71PGLEAw==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"prism-media": "^1.3.2",
"tiny-typed-emitter": "^2.1.0",
"tslib": "^2.3.1",
"ws": "^8.2.3"
},
"dependencies": {
"discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A=="
}
}
},
"@mapbox/node-pre-gyp": {
@@ -1519,24 +1654,50 @@
}
},
"@sapphire/async-queue": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz",
"integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA=="
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ=="
},
"@sindresorhus/is": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz",
"integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g=="
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.1.tgz",
"integrity": "sha512-BrzrgtaqEre0qfvI8sMTaEvx+bayuhPmfe2rfeUGPPHYr/PLxCOqkOe4TQTDPb+qcqgNcsAtXV/Ew74mcDIE8w=="
},
"@types/node": {
"version": "16.6.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz",
"integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw=="
},
"@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
},
"dependencies": {
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"@types/tough-cookie": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz",
"integrity": "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg=="
},
"@types/ws": {
"version": "7.4.7",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",
"integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==",
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"requires": {
"@types/node": "*"
}
@@ -1608,6 +1769,15 @@
"follow-redirects": "^1.14.0"
}
},
"axios-cookiejar-support": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/axios-cookiejar-support/-/axios-cookiejar-support-1.0.1.tgz",
"integrity": "sha512-IZJxnAJ99XxiLqNeMOqrPbfR7fRyIfaoSLdPUf4AMQEGkH8URs0ghJK/xtqBsD+KsSr3pKl4DEQjCn834pHMig==",
"requires": {
"is-redirect": "^1.0.0",
"pify": "^5.0.0"
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -1659,11 +1829,6 @@
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
},
"canvas": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz",
@@ -1781,32 +1946,30 @@
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
},
"discord-api-types": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
"integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg=="
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz",
"integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ=="
},
"discord.js": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz",
"integrity": "sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==",
"version": "13.6.0",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz",
"integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==",
"requires": {
"@discordjs/builders": "^0.5.0",
"@discordjs/collection": "^0.2.1",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.4",
"@types/ws": "^7.4.7",
"discord-api-types": "^0.22.0",
"@discordjs/builders": "^0.11.0",
"@discordjs/collection": "^0.4.0",
"@sapphire/async-queue": "^1.1.9",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.2",
"discord-api-types": "^0.26.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
"ws": "^7.5.1"
"ws": "^8.4.0"
}
},
"dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"requires": {
"is-obj": "^2.0.0"
}
"dotenv": {
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz",
"integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q=="
},
"doublearray": {
"version": "0.0.2",
@@ -1929,9 +2092,19 @@
}
},
"follow-redirects": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
"integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw=="
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.2.0",
@@ -2052,10 +2225,10 @@
"number-is-nan": "^1.0.0"
}
},
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
"is-redirect": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ="
},
"isarray": {
"version": "1.0.0",
@@ -2088,16 +2261,24 @@
"kuromoji": "^0.1.1"
}
},
"libsodium": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz",
"integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A=="
},
"libsodium-wrappers": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz",
"integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==",
"requires": {
"libsodium": "^0.7.0"
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -2254,19 +2435,6 @@
"wrappy": "1"
}
},
"ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"requires": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
}
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -2282,6 +2450,17 @@
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"pify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz",
"integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA=="
},
"prism-media": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.2.tgz",
"integrity": "sha512-L6UsGHcT6i4wrQhFF1aPK+MNYgjRqR2tUoIqEY+CG1NqVkMjPRKzS37j9f8GiYPlD6wG9ruBj+q5Ax+bH8Ik1g==",
"requires": {}
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -2296,6 +2475,16 @@
"ipaddr.js": "1.9.1"
}
},
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@@ -2494,11 +2683,26 @@
"yallist": "^4.0.0"
}
},
"tiny-typed-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz",
"integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA=="
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"tough-cookie": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
"requires": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.1.2"
}
},
"ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
@@ -2509,11 +2713,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA=="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -2523,6 +2722,11 @@
"mime-types": "~2.1.24"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -2538,16 +2742,22 @@
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"vrchat": {
"version": "1.6.9",
"resolved": "https://registry.npmjs.org/vrchat/-/vrchat-1.6.9.tgz",
"integrity": "sha512-eV3EzHtObBGIzb5tEOP6vqeZsGIlMLXybO2CwpkSDvGra2ORIoh5hYnUq9JeMnAsmwF/xMpPHrb5yg5ZPDhAoA==",
"requires": {
"@types/tough-cookie": "^4.0.1",
"axios": "^0.21.4",
"axios-cookiejar-support": "^1.0.1",
"tough-cookie": "^4.0.0"
}
},
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
@@ -2562,9 +2772,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.2.tgz",
"integrity": "sha512-lkF7AWRicoB9mAgjeKbGqVUekLnSNO4VjKVnuPHpQeOxZOErX6BPXwJk70nFslRCEEA8EVW7ZjKwXaP9N+1sKQ==",
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.4.1.tgz",
"integrity": "sha512-6eqQ4yN2y2xv8b+BgbkUzPPyfo/PDl3VOWb06ZE0jIFYwuHMsMQN6F7o84yxJYCblfCRAxzpU59We4Rr4w0Luw==",
"requires": {}
},
"yallist": {
@@ -2576,6 +2786,11 @@
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/zlibjs/-/zlibjs-0.3.1.tgz",
"integrity": "sha1-UBl+2yihxCymWcyLTmqd3W1ERVQ="
},
"zod": {
"version": "3.11.6",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.11.6.tgz",
"integrity": "sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg=="
}
}
}
+6 -2
View File
@@ -1,11 +1,15 @@
{
"dependencies": {
"@discordjs/voice": "^0.7.5",
"deepl": "^1.0.12",
"discord.js": "^13.1.0",
"discord.js": "^13.6.0",
"dotenv": "^16.0.0",
"express": "^4.17.1",
"fast-average-color-node": "^1.0.3",
"kuroshiro": "^1.2.0",
"kuroshiro-analyzer-kuromoji": "^1.1.0",
"node-fetch": "^2.6.1"
"libsodium-wrappers": "^0.7.9",
"node-fetch": "^2.6.1",
"vrchat": "^1.6.9"
}
}
+45 -31
View File
@@ -5,15 +5,31 @@ var Discord = require("discord.js");
var client = require("./client");
var config = require("./config");
var app = require("./www");
var commands = require("./commands");
/*commands.push({
type: "MESSAGE",
name: "Archive",
exec: async i => {
let message = await i.channel.messages.fetch(i.targetId);
let asdf = await doThing(message, i.user);
i.reply({
content: `https://discord.com/channels/${asdf.guild.id}/${asdf.channel.id}/${asdf.id}`,
ephemeral: true
});
}
});*/
client.on("messageReactionAdd", async (reaction, user) => {
if (reaction.emoji.name == '📍' || reaction.emoji.name == '📌') {
if (!reaction.message.guild) return;
if (reaction.message.channel.id == config.archive_channel) return;
if (reaction.message['has been "pinned"'] || reaction.count > 1) return;
reaction.message['has been "pinned"'] = true;
if (reaction.message['has been pinned'] || reaction.count > 1) return;
reaction.message['has been pinned'] = true;
if (reaction.message.channel.id == config.porn_channel) {
/*if (reaction.message.channel.id == config.porn_channel)*/ {
try {
await reaction.message.pin();
} catch (e) {
@@ -31,35 +47,33 @@ client.on("messageReactionAdd", async (reaction, user) => {
}
}
// cache avatar because discord doesn't keep it if they change it
var avatarURL = reaction.message.author.avatarURL({dynamic: true});
if (avatarURL) {
let afn = avatarURL.split('/').pop();
let lapath = config.data_dir + "avatars/" + afn;
if (!fs.existsSync(lapath)) {
try {
(await fetch(avatarURL)).body.pipe(fs.createWriteStream(lapath));
} catch (error) {
console.error("avatar download", error.message);
}
}
avatarURL = `https://${config.web_hostname}/avatars/${afn}`
} else avatarURL = reaction.message.author.defaultAvatarURL;
let imageCandidate = reaction.message.attachments.find(a => [".png",".jpg",".jpeg",".webp",".gif"].some(e => a.url.toLowerCase().endsWith(e)));
if (imageCandidate) imageCandidate["will be used for the image of the embed"] = true;
else imageCandidate = reaction.message.embeds.find(e => e.type == 'image');
let embed = new Discord.MessageEmbed()
.setAuthor(reaction.message.member?.displayName || reaction.message.author.username, avatarURL)
.setDescription(reaction.message.content)
.setImage(imageCandidate?.url)
.setFooter(`Pinned by ${reaction.message.guild.members.resolve(user)?.displayName || user.username}`)
.setTimestamp(reaction.message.createdAt)
.setColor(reaction.message.member?.roles.color?.color);
let attachments = reaction.message.attachments.filter(a => !a["will be used for the image of the embed"]).map(a => `[${a.name}](${a.url})`).join('\n');
if (attachments) embed.addField("Attachments", attachments);
(await client.channels.fetch(config.archive_channel))?.send({content: `https://discord.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}`, embeds:[embed]});
doThing(reaction.message, user);
}
});
async function doThing(message, user) {
var avatarURL = message.author.avatarURL({dynamic: true}) || message.author.defaultAvatarURL;
var avatarName = avatarURL.split('/').pop();
let imageCandidate = message.attachments.find(a => [".png",".jpg",".jpeg",".webp",".gif"].some(e => a.url.toLowerCase().endsWith(e)));
if (imageCandidate) imageCandidate["will be used for the image of the embed"] = true;
else imageCandidate = message.embeds.find(e => e.type == 'image');
let embed = new Discord.MessageEmbed()
.setAuthor(message.member?.displayName || message.author.username, `attachment://${avatarName}`)
.setDescription(message.content)
.setImage(imageCandidate?.url)
.setFooter(`Pinned by ${message.guild.members.resolve(user)?.displayName || user.username}`)
.setTimestamp(message.createdAt)
.setColor(message.member?.roles.color?.color);
let attachments = message.attachments.filter(a => !a["will be used for the image of the embed"]).map(a => `[${a.name}](${a.url})`).join('\n');
if (attachments) embed.addField("Attachments", attachments);
return (await client.channels.fetch(config.archive_channel))?.send({
content: `https://discord.com/channels/${message.guild.id}/${message.channel.id}/${message.id}`,
files: [{attachment: avatarURL, name: avatarName}],
embeds:[embed]
});
}
app.use("/avatars/", require("express").static(config.data_dir + "avatars/"));
+8 -44
View File
@@ -1,16 +1,13 @@
var fetch = require("node-fetch");
var https = require("https");
var fs = require("fs");
var client = require("./client");
var config = require("./config");
var commands = require("./commands");
var app = require("./www");
client.on("messageCreate", async message => {
if (message.guild.id != config.guild) return;
if (message.guild?.id != config.guild) return;
if (message.author.bot) return;
if (message.author.id == client.user.id) return;
let pixiv_urls = new Set(message.content.match(/https?:\/\/(?:www\.)?pixiv\.net(?:\/en)?\/artworks\/\d+\b/g));
let pixiv_urls = new Set(message.content.match(/(?<!\/)https?:\/\/(?:www\.)?pixiv\.net(?:\/en)?\/artworks\/\d+\b/g));
if (!pixiv_urls.size) return;
message.suppressEmbeds();
// suppressing embeds doesn't work on embeds that load after
@@ -45,13 +42,13 @@ commands.push({
// using this code for embedding links and for slash commands
async function embedPixiv(/*message*/ channel, /*array of*/ links, send /* channel.send or interaction.reply function */, showLinks /* include pixiv links in response content */) {
async function embedPixiv(/*message*/ channel, /*array of*/ links, send = channel.send.bind(channel) /* or interaction.reply function */, showLinks /* include pixiv links in response content */) {
for (let link of links) {
try {
let illust = Object.values(JSON.parse((await (await fetch(link)).text()).match(/<meta name="preload-data" id="meta-preload-data" content='(.*)'>/)[1]).illust)[0];
let content;
let content = `**${illust.title}**\n`;
if (showLinks || illust.illustType == 2) {
content = `<${link}>${illust.illustType == 2 ? " is an animation (must open link to play)" : ''}`;
content += `<${link}>${illust.illustType == 2 ? " is an animation (must open link to play)" : ''}`;
}
let images = [];
for (let i = 0; i < illust.pageCount; i++) images.push({url: illust.urls.original.replace('p0', 'p'+i)});
@@ -70,9 +67,7 @@ async function embedPixiv(/*message*/ channel, /*array of*/ links, send /* chann
}
} else await fallback();
function fallback() {
// save the data already downloaded
for (let image of images) if (image.data) fs.writeFileSync(config.data_dir + "pixiv-cache/" + image.url.split('?')[0].replace(/\//g, '\\'), image.data);
let urls = images.map(image => image.url.replace("https://i.pximg.net/", `https://${config.web_hostname}/pixiv-proxy/`));
let urls = images.map(image => image.url.replace("i.pximg.net", "px.owo39.me"));
if (illust.xRestrict && !channel.nsfw) urls = urls.map(url => `||${url} ||`);
urls = urls.join('\n');
if (urls.length > 2000) {
@@ -92,35 +87,4 @@ async function embedPixiv(/*message*/ channel, /*array of*/ links, send /* chann
}
}
app.use("/pixiv-proxy/", (req, res, next) => {
if (req.method != "GET") return next();
let local_file_path = config.data_dir + "pixiv-cache/" + req.url.split('?')[0].replace(/\//g, '\\');
if (fs.existsSync(local_file_path)) res.sendFile(local_file_path);
else {
https.get(`https://i.pximg.net${req.url}`, {
headers: {
"Referer": "https://www.pixiv.net/"
}
}, function (origin_res) {
if (res.statusCode != 200) return res.status(502).send(`upstream said ${res.statusCode}`);
res.writeHead(200, {
"Content-Type": origin_res.headers["content-type"]
});
let local_file_stream = fs.createWriteStream(local_file_path);
origin_res.on("data", data => {
res.write(data);
local_file_stream.write(data);
});
origin_res.on("end", () => {
res.end();
local_file_stream.end();
});
}).on("error", error => {
res.status(502).send(error.message);
console.error("pixiv proxy error,", error.message);
});
}
});
module.exports.embedPixiv = embedPixiv;
+31
View File
@@ -0,0 +1,31 @@
var client = require("./client");
var DataStore = require("./datastore");
var fetch = require("node-fetch");
var {embedPixiv} = require("./pixiv-embedder");
var config = require("./config");
async function check(tag, channel) {
var ds = new DataStore(`s${tag}`);
var t = encodeURIComponent(tag);
var data = await (await fetch(`https://www.pixiv.net/ajax/search/artworks/${t}?word=${t}&order=date_d&mode=all&p=1&s_mode=s_tag_full&type=all&lang=en`)).json();
var illusts = data.body.illustManga.data;
var newPosts = [];
for (let owo of illusts) {
if (!ds.get(owo.id)) {
newPosts.push(owo);
ds.put(owo.id);
} else break;
}
for (let i = newPosts.length - 1; i >= 0; i--) {
await embedPixiv(
client.channels.resolve(channel),
[`https://www.pixiv.net/en/artworks/${newPosts[i].id}`],
undefined,
true
);
}
}
module.exports.check = check;
module.exports.interval = setInterval(function() {
config.pixiv_subscriptions.forEach(x => check(x.tag, x.channel));
}, 1000*60*60);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

+115 -8
View File
@@ -6,15 +6,47 @@ var KuromojiAnalyzer = require("kuroshiro-analyzer-kuromoji");
var kuroshiro = new Kuroshiro();
kuroshiro.init(new KuromojiAnalyzer());
var lang2flag = {
BG: '🇧🇬',
CS: '🇨🇿',
DA: '🇩🇰',
DE: '🇩🇪',
EL: '🇬🇷',
EN: '🇬🇧',
'EN-GB': '🇬🇧',
'EN-US': '🇺🇸',
ES: '🇪🇸',
ET: '🇪🇪',
FI: '🇫🇮',
FR: '🇫🇷',
HU: '🇭🇺',
IT: '🇮🇹',
JA: '🇯🇵',
LT: '🇱🇹',
LV: '🇱🇻',
NL: '🇳🇱',
PL: '🇵🇱',
PT: '🇵🇹',
'PT-PT': '🇵🇹',
'PT-BR': '🇧🇷',
RO: '🇷🇴',
RU: '🇷🇺',
SK: '🇸🇰',
SL: '🇸🇮',
SV: '🇸🇻',
ZH: '🇨🇳'
};
commands.push({
name: "toen",
description: "Translate text to English",
global: true,
options: [
{
type: "STRING",
name: "text",
description: "Text",
description: "Text to translate",
required: true
}
],
@@ -23,20 +55,70 @@ commands.push({
commands.push({
name: "toja",
description: "Translate text to Japanese",
global: true,
options: [
{
type: "STRING",
name: "text",
description: "Text",
description: "Text to translate",
required: true
}
],
exec: i => t(i, "JA")
});
commands.push({
name: "tolang",
description: "Translate text to any language",
global: true,
options: [
{
type: "STRING",
name: "lang",
description: "Language to translate to",
required: true,
choices: [
{ name: 'Bulgarian', value: 'BG' },
{ name: 'Czech', value: 'CS' },
{ name: 'Danish', value: 'DA' },
{ name: 'German', value: 'DE' },
{ name: 'Greek', value: 'EL' },
{ name: 'English (British)', value: 'EN-GB' },
{ name: 'English (American)', value: 'EN-US' },
{ name: 'Spanish', value: 'ES' },
{ name: 'Estonian', value: 'ET' },
{ name: 'Finnish', value: 'FI' },
{ name: 'French', value: 'FR' },
{ name: 'Hungarian', value: 'HU' },
{ name: 'Italian', value: 'IT' },
{ name: 'Japanese', value: 'JA' },
{ name: 'Lithuanian', value: 'LT' },
{ name: 'Latvian', value: 'LV' },
{ name: 'Dutch', value: 'NL' },
{ name: 'Polish', value: 'PL' },
// { name: 'Portuguese (all Portuguese varieties excluding Brazilian Portuguese)', value: 'PT-PT' },
{ name: 'Portuguese (Brazilian)', value: 'PT-BR' },
{ name: 'Romanian', value: 'RO' },
{ name: 'Russian', value: 'RU' },
{ name: 'Slovak', value: 'SK' },
{ name: 'Slovenian', value: 'SL' },
{ name: 'Swedish', value: 'SV' },
{ name: 'Chinese', value: 'ZH' }
]
},
{
type: "STRING",
name: "text",
description: "Text to translate",
required: true
}
],
exec: i => t(i, i.options.getString("lang"))
});
async function t(i, target_lang) {
var text = i.options.getString("text");
await i.deferReply();
try {
var translation = (await deepl({
text,
@@ -47,15 +129,40 @@ async function t(i, target_lang) {
} catch (error) {
return void await i.editReply(error.message);
}
if (translation.detected_source_language == "JA") {
try {
if (translation.detected_source_language == "JA") try {
var input_romaji = await kuroshiro.convert(text, {to: "romaji", mode: "spaced"});
} catch (error) {}
}
if (target_lang == "JA") {
try {
if (target_lang == "JA") try {
var output_romaji = await kuroshiro.convert(translation.text, {to: "romaji", mode: "spaced"});
} catch (error) {}
let input_flag = lang2flag[translation.detected_source_language] || `[${translation.detected_source_language}]`;
let output_flag = lang2flag[target_lang] || `[${target_lang}]`;
let msg = input_flag + ' ' + text;
if (input_romaji) msg += '\n' + input_flag + ' ' + input_romaji;
msg += '\n' + output_flag + ' ' + translation.text;
if (output_romaji) msg += '\n' + output_flag + ' ' + output_romaji;
await i.editReply(msg);
try {
var reverse_translation = (await deepl({
text: translation.text,
target_lang: translation.detected_source_language,
free_api: true,
auth_key: config.deepl_auth_key
})).data.translations[0];
if (normalize(text) != normalize(reverse_translation.text)){
if (translation.detected_source_language == "JA") try {
var reverse_romaji = await kuroshiro.convert(reverse_translation.text, {to: "romaji", mode: "spaced"});
} catch (error) {}
await i.editReply(`${msg}\n🔁 ${reverse_translation.text}${reverse_romaji ? `\n🔁 ${reverse_romaji}` : ''}`);
}
await i.editReply(`${text}${input_romaji ? `\n${input_romaji}` : ''}\n${translation.text}${output_romaji ? `\n${output_romaji}` : ''}`);
} catch(error) {}
}
function normalize(text) {
return text.toLowerCase()//.split('').filter(x => x.match(/[a-z0-9 ]/)).join('');
}
+40
View File
File diff suppressed because one or more lines are too long
+98
View File
@@ -0,0 +1,98 @@
var vrchat = require("vrchat");
var client = require("./client");
var config = require("./config");
var fs = require("fs");
var configuration = new vrchat.Configuration(config.vrchat_configuration);
var authenticationApi = new vrchat.AuthenticationApi(configuration);
authenticationApi.getCurrentUser().then(console.log);
var usersApi = new vrchat.UsersApi(configuration);
var worldsApi = new vrchat.WorldsApi(configuration);
var status2icon = {
"join me": '🔵',
"active": '🟢',
"ask me": '🟠',
"busy": '🔴',
"offline": '⚫'
}
try {
var vrcul = JSON.parse(fs.readFileSync("data/vrcul.json"), "utf8");
} catch(error) {
var vrcul = [];
}
async function updateUserStatuses() {
for (let x of vrcul) {
try {
let user = (await usersApi.getUser(x.userId)).data;
let status_icon = user.state == "online" ? status2icon[user.status] : '⚫';
let nn = `${status_icon} ${user.displayName}`;
var channel = client.channels.resolve(x.channel);
if (!channel) {
channel = await client.channels.resolve(config.vrchat_status_category).createChannel(nn, {type: "GUILD_VOICE"});
x.channel = channel.id;
fs.writeFileSync("data/vrcul.json", JSON.stringify(vrcul));
} else if (nn != channel.name) {
await channel.setName(nn);
}
continue;
let belowChannel = client.channels.resolve(config.vrchat_status_category).children.find(x => x.position == channel.position + 1);
if (user.worldId && user.worldId != "offline") {
let bcn = `${await getWorldNameForId(user.worldId)}`;
if (belowChannel && belowChannel.name.startsWith('┗') && belowChannel.name != bcn) { //todo debug
await belowChannel.setName(bcn);
} else {
let ch = await client.channels.resolve(config.vrchat_status_category).createChannel(`${await getWorldNameForId(user.worldId)}`, {type: "GUILD_VOICE", /*position: belowChannel.position*/});
// position option is erratic
await ch.setPosition(channel.position + 1);
}
} else if (belowChannel?.name.startsWith('┗')) {
await belowChannel.delete();
}
} catch (error) {
console.error("vrcus", error.stack);
}
}
}
module.exports.interval = setInterval(updateUserStatuses, 1000*60*5);
client.on("interactionCreate", async i => {
if (i.commandName == "addvru") {
try {
await i.deferReply();
let u = i.options.getString("user");
let user = (await usersApi[u.startsWith("usr_") ? 'getUser' : 'getUserByName'](u)).data;
let status_icon = user.state == "online" ? status2icon[user.status] : '⚫';
let nn = `${status_icon} ${user.displayName}`;
let channel = await client.channels.resolve(config.vrchat_status_category).createChannel(nn, {type: "GUILD_VOICE"});
vrcul.push({channel: channel.id, userId: user.id});
fs.writeFileSync("data/vrcul.json", JSON.stringify(vrcul));
await i.editReply(channel.toString());
} catch (error) {
i.reply(error.message);
}
}
});
var worldnamecache = {};
async function getWorldNameForId(worldId) {
if (worldId == "private") return "Private World";
return worldnamecache[worldId] = worldnamecache[worldId] || (await worldsApi.getWorld(worldId)).data.name;
}
+21
View File
@@ -0,0 +1,21 @@
var client = require("./client");
var config = require("./config");
client.once("ready", () => {
(function clock() {
var d = new Date();
for (let x of config.world_clock) {
let t = x.flag + ' ' + Intl.DateTimeFormat("en", {
timeZone: x.timezone,
hour: 'numeric',
//minute: 'numeric',
timeZoneName: 'long',
hour12: true
}).format(d);
t = t.replace(/[a-z]+(?: |$)/g, ''); // most of the abbrv are GMT+n >:(
client.channels.resolve(x.channel)?.setName(t);
}
d.setMinutes(60);
setTimeout(clock, d - Date.now());
})();
});
File diff suppressed because one or more lines are too long