Compare commits
8 Commits
v1.3.0-wai
...
main
Author | SHA1 | Date | |
---|---|---|---|
f9bb94a4a1 | |||
1575d0047c | |||
d173338d09 | |||
aedbbec6a2 | |||
fa41a5d61e | |||
ac6eca4827 | |||
88cc4eda3c | |||
7291216dcb |
@ -1,3 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
.env*
|
env.dev
|
||||||
|
env.prod
|
||||||
|
.env
|
0
.github/workflows/docker-image-dev.yml → .gitea/workflows/docker-image-dev.yml
Executable file → Normal file
0
.github/workflows/docker-image-dev.yml → .gitea/workflows/docker-image-dev.yml
Executable file → Normal file
47
.gitea/workflows/docker-image-prod.yml
Normal file
47
.gitea/workflows/docker-image-prod.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Silvanus Production Dockerization
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
||||||
|
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Pull latest from Git
|
||||||
|
run: |
|
||||||
|
pwd
|
||||||
|
whoami
|
||||||
|
mkdir -p /var/lib/act_runner/
|
||||||
|
cd /var/lib/act_runner/
|
||||||
|
if [ ! -d "silvanus" ]; then
|
||||||
|
git clone https://git.vfsh.dev/voidf1sh/silvanus
|
||||||
|
cd silvanus
|
||||||
|
else
|
||||||
|
cd silvanus
|
||||||
|
git pull
|
||||||
|
fi
|
||||||
|
git checkout ${{ gitea.ref}}
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: |
|
||||||
|
cd /var/lib/act_runner/silvanus
|
||||||
|
docker build . --file Dockerfile --tag v0idf1sh/silvanus
|
||||||
|
- name: Log into Docker Hub
|
||||||
|
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
||||||
|
- name: Push image to Docker Hub
|
||||||
|
run: |
|
||||||
|
cd /var/lib/act_runner/silvanus
|
||||||
|
docker push v0idf1sh/silvanus
|
||||||
|
- name: Restart the container
|
||||||
|
run: |
|
||||||
|
cd /srv/docker/silvanus
|
||||||
|
docker-compose down
|
||||||
|
docker-compose up -d
|
35
.github/workflows/docker-image-prod.yml
vendored
35
.github/workflows/docker-image-prod.yml
vendored
@ -1,35 +0,0 @@
|
|||||||
name: Silvanus Production Dockerization
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
|
||||||
DHUB_UNAME: ${{ secrets.DHUB_UNAME }}
|
|
||||||
DHUB_PWORD: ${{ secrets.DHUB_PWORD }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: self-hosted
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Pull latest from Git
|
|
||||||
run: |
|
|
||||||
pwd
|
|
||||||
whoami
|
|
||||||
cd /root/silvanus
|
|
||||||
git pull
|
|
||||||
git checkout $GITHUB_HEAD_REF
|
|
||||||
- name: Build the Docker image
|
|
||||||
run: |
|
|
||||||
cd /root/silvanus
|
|
||||||
docker build . --file Dockerfile --tag v0idf1sh/silvanus
|
|
||||||
- name: Log into Docker Hub
|
|
||||||
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
|
|
||||||
- name: Push image to Docker Hub
|
|
||||||
run: |
|
|
||||||
cd /root/silvanus
|
|
||||||
docker push v0idf1sh/silvanus
|
|
@ -1,3 +1,5 @@
|
|||||||
|
![Current Uptime Status](https://status.vfsh.dev/api/badge/1/status)
|
||||||
|
![Uptime Percentage](https://status.vfsh.dev/api/badge/1/uptime)
|
||||||
# Silvanus
|
# Silvanus
|
||||||
Silvanus is the ultimate Grow A Tree companion bot! Quickly compare your server's tree to others on the leaderboard with automatic calculation of tree height differences, active growth detection, watering time calculations, and more!
|
Silvanus is the ultimate Grow A Tree companion bot! Quickly compare your server's tree to others on the leaderboard with automatic calculation of tree height differences, active growth detection, watering time calculations, and more!
|
||||||
|
|
||||||
@ -10,7 +12,7 @@ Silvanus is not affiliated with Grow A Tree or Limbo Labs.
|
|||||||
[Join Discord Server](https://discord.gg/g5JRGn7PxU)
|
[Join Discord Server](https://discord.gg/g5JRGn7PxU)
|
||||||
|
|
||||||
## Silvanus Support Wiki
|
## Silvanus Support Wiki
|
||||||
Find the most up-to-date guides and information about Silvanus at the [Silvanus Wiki](https://git.vfsh.dev/voidf1sh/silvanus/wiki).
|
Find the most up-to-date guides and information about Silvanus at the [Silvanus Support Wiki](https://silvanus.vfsh.dev/).
|
||||||
[Silvanus Setup Guide](https://git.vfsh.dev/voidf1sh/silvanus/wiki/Silvanus-Setup-Guide)
|
[Silvanus Setup Guide](https://silvanus.vfsh.dev/en/setup)
|
||||||
|
|
||||||
Please find the most up-to-date guides and information at the [Silvanus Support Discord Server](https://discord.gg/g5JRGn7PxU)!
|
Please find the most up-to-date guides and information at the Silvanus Support Discord Server!
|
@ -5,12 +5,10 @@
|
|||||||
"help": {
|
"help": {
|
||||||
"title": "Silvanus Help",
|
"title": "Silvanus Help",
|
||||||
"aboutTitle": "About Silvanus",
|
"aboutTitle": "About Silvanus",
|
||||||
"aboutDescription": "Silvanus is a dedicated companion bot designed for Grow A Tree, the popular Discord clicker game. With Silvanus by your side, you can take your tree-growing adventure to new heights! Enjoy customizable notifications, effortless tree height comparisons, and handy math features to optimize your gameplay. Join over 130 servers already benefiting from Silvanus and make your Grow A Tree experience even more exciting!",
|
"info": "Silvanus is the ultimate companion bot designed for Grow A Tree, the popular Discord clicker game. With Silvanus by your side, you can take your tree-growing adventure to new heights! Enjoy customizable notifications, effortless tree height comparisons, and handy math features to optimize your gameplay.\n\n[Privacy Policy](https://assets.vfsh.dev/privacy.txt)",
|
||||||
"aboutLinks": "**Links**\n* [Website](https://silvanus.vfsh.dev)\n* [Wiki](https://git.vfsh.dev/voidf1sh/silvanus/wiki)\n* [Git Repo](https://git.vfsh.dev/voidf1sh/silvanus)\n* [Support Server](https://discord.gg/g5JRGn7PxU)\n* [Top.gg](https://top.gg/bot/521624335119810561)\n* [Privacy Policy](https://assets.vfsh.dev/privacy.txt)\n* [Terms of Use](https://www.termsfeed.com/live/5e192b88-ece7-4ba3-8b50-7a1f997d781a)",
|
|
||||||
"info": "Silvanus is the ultimate companion bot designed for Grow A Tree, the popular Discord clicker game. With Silvanus by your side, you can take your tree-growing adventure to new heights! Enjoy customizable notifications, effortless tree height comparisons, and handy math features to optimize your gameplay.",
|
|
||||||
"topggTitle": "Want to support Silvanus?",
|
"topggTitle": "Want to support Silvanus?",
|
||||||
"topggBody": "Vote and leave a review for Silvanus [on Top.gg](https://top.gg/bot/521624335119810561)",
|
"topggBody": "Vote and leave a review for Silvanus [on Top.gg](https://top.gg/bot/521624335119810561)",
|
||||||
"setup": "For the most up to date guides and information, check out the [Silvanus Support Wiki](https://git.vfsh.dev/voidf1sh/silvanus/wiki)\n\nNeed help and can't reach me on Discord? Send an email to `sky@vfsh.dev` and I'll get back to you ASAP.",
|
"setup": "For the most up to date guides and information, check out the Silvanus Support Wiki - https://silvanus.vfsh.dev/\n[Silvanus Setup Guide](https://silvanus.vfsh.dev/en/setup)\n\nNeed help and can't reach me on Discord? Send an email to SilvanusDev@gmail.com and I'll get back to you ASAP.",
|
||||||
"longDescription": "Silvanus, the ultimate companion bot for Grow A Tree, takes your tree-growing journey to the next level. Are you tired of cluttered channels filled with notifications? Silvanus has you covered! With its unique notification relay system, Silvanus listens for Grow A Tree's notifications in a hidden channel and sends customized, auto-deleting notifications to the channels of your choice. Customize your notifications and keep your server clean and organized.\n\nSilvanus simplifies leaderboard tree height comparisons with a simple command. No more manual calculations or guesswork. Silvanus shows you exactly how far you are from the next tree on the leaderboard, allowing you to gauge your progress effortlessly.",
|
"longDescription": "Silvanus, the ultimate companion bot for Grow A Tree, takes your tree-growing journey to the next level. Are you tired of cluttered channels filled with notifications? Silvanus has you covered! With its unique notification relay system, Silvanus listens for Grow A Tree's notifications in a hidden channel and sends customized, auto-deleting notifications to the channels of your choice. Customize your notifications and keep your server clean and organized.\n\nSilvanus simplifies leaderboard tree height comparisons with a simple command. No more manual calculations or guesswork. Silvanus shows you exactly how far you are from the next tree on the leaderboard, allowing you to gauge your progress effortlessly.",
|
||||||
"allCommands": "</compare:1077058896469966889> - Compare your tree to others on the leaderboard\n</relay set:1077322799032578152> - Setup a Notification Relay for the first time\n</relay update:1077322799032578152> - Update an already configured Notification Relay\n</relay disable:1077322799032578152> - Disable the Notification Relay\n</rolemenu:1077058896469966892> - Send a self-assignable role menu for relay pings\n</watertime:1077058896469966895> - Calculates the time between waters for a tree of a given height\n</timetoheight:1077058896469966894> - Calculates how long it would take a tree to grow to a given height\n</setup compare:1077058896469966893> - Set the channels to use with </compare:1077058896469966889>\n</setup view:1077058896469966893> - View your server's configuration\n</setup reset:1077058896469966893> - Delete your server's configuration\n</help:1077058896469966890> - Displays the bot's help page"
|
"allCommands": "</compare:1077058896469966889> - Compare your tree to others on the leaderboard\n</relay set:1077322799032578152> - Setup a Notification Relay for the first time\n</relay update:1077322799032578152> - Update an already configured Notification Relay\n</relay disable:1077322799032578152> - Disable the Notification Relay\n</rolemenu:1077058896469966892> - Send a self-assignable role menu for relay pings\n</watertime:1077058896469966895> - Calculates the time between waters for a tree of a given height\n</timetoheight:1077058896469966894> - Calculates how long it would take a tree to grow to a given height\n</setup compare:1077058896469966893> - Set the channels to use with </compare:1077058896469966889>\n</setup view:1077058896469966893> - View your server's configuration\n</setup reset:1077058896469966893> - Delete your server's configuration\n</help:1077058896469966890> - Displays the bot's help page"
|
||||||
},
|
},
|
||||||
|
10
main.js
10
main.js
@ -69,7 +69,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
if (client.slashCommands.has(commandName)) {
|
if (client.slashCommands.has(commandName)) {
|
||||||
client.slashCommands.get(commandName).execute(interaction);
|
client.slashCommands.get(commandName).execute(interaction);
|
||||||
} else {
|
} else {
|
||||||
interaction.reply('Sorry, I don\'t have access to that command.').catch(e => console.err(e));
|
interaction.reply('Sorry, I don\'t have access to that command.');
|
||||||
console.error('Slash command attempted to run but not found: ' + commandName);
|
console.error('Slash command attempted to run but not found: ' + commandName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
case 'refresh':
|
case 'refresh':
|
||||||
// console.log(JSON.stringify(interaction));
|
// console.log(JSON.stringify(interaction));
|
||||||
await fn.refresh(interaction).catch(err => {
|
await fn.refresh(interaction).catch(err => {
|
||||||
interaction.channel.send(fn.builders.errorEmbed("Oops! Something went wrong!")).catch(e => console.err(e));
|
interaction.channel.send(fn.builders.errorEmbed("Oops! Something went wrong!"));
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'deleteping':
|
case 'deleteping':
|
||||||
@ -103,10 +103,10 @@ client.on('interactionCreate', async interaction => {
|
|||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if (err === "Guild doesn't exist in database!") {
|
if (err === "Guild doesn't exist in database!") {
|
||||||
interaction.channel.send(fn.builders.errorEmbed(strings.error.noGuild)).catch(e => console.err(e));
|
interaction.channel.send(fn.builders.errorEmbed(strings.error.noGuild));
|
||||||
console.error(err);
|
console.error(err);
|
||||||
} else {
|
} else {
|
||||||
interaction.channel.send("Oops! An error occurred... Sorry about that, please contact my owner @vfsh if this keeps happening.").catch(e => console.err(e));
|
interaction.channel.send("Oops! An error occurred... Sorry about that, please contact my owner @vfsh if this keeps happening.");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ client.on('messageUpdate', async (oldMessage, message) => {
|
|||||||
await fn.messages.updateHandler(message).catch(async e => {
|
await fn.messages.updateHandler(message).catch(async e => {
|
||||||
switch (e) {
|
switch (e) {
|
||||||
case strings.error.noCompareMessage:
|
case strings.error.noCompareMessage:
|
||||||
await message.channel.send(strings.error.noCompareMessage).catch(e => console.err(e));
|
await message.channel.send(strings.error.noCompareMessage);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -99,12 +99,6 @@ const functions = {
|
|||||||
await dbfn.setGuildInfo(query);
|
await dbfn.setGuildInfo(query);
|
||||||
await functions.collectionBuilders.guildInfos(client);
|
await functions.collectionBuilders.guildInfos(client);
|
||||||
console.log("Disabled notification relay for a guild I'm no longer in: " + guildInfo.guildId);
|
console.log("Disabled notification relay for a guild I'm no longer in: " + guildInfo.guildId);
|
||||||
} else if (e === "ERRNOCHANNEL") {
|
|
||||||
guildInfo.setReminders(undefined, undefined, undefined, undefined, false);
|
|
||||||
const query = guildInfo.queryBuilder("setReminders");
|
|
||||||
await dbfn.setGuildInfo(query);
|
|
||||||
await functions.collectionBuilders.guildInfos(client);
|
|
||||||
console.log("Disabled notification relay for a channel I no longer see: " + guildInfo.watchChannelId);
|
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
@ -235,8 +229,11 @@ const functions = {
|
|||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setColor(strings.embeds.color)
|
.setColor(strings.embeds.color)
|
||||||
.setTitle(strings.help.aboutTitle)
|
.setTitle(strings.help.aboutTitle)
|
||||||
.setDescription(`${strings.help.aboutDescription}\n\n${strings.help.aboutLinks}`)
|
.setDescription(`${strings.help.info}\n\n${strings.help.longDescription}`)
|
||||||
.setFooter({ text: `v${package.version} - ${strings.embeds.footer}` });
|
.setFooter({ text: `v${package.version} - ${strings.embeds.footer}` });
|
||||||
|
embed.addFields([
|
||||||
|
{ name: strings.help.topggTitle, value: strings.help.topggBody}
|
||||||
|
]);
|
||||||
const privateBool = private == 'true';
|
const privateBool = private == 'true';
|
||||||
const messageContents = { embeds: [embed], ephemeral: privateBool };
|
const messageContents = { embeds: [embed], ephemeral: privateBool };
|
||||||
return messageContents;
|
return messageContents;
|
||||||
@ -618,16 +615,11 @@ const functions = {
|
|||||||
const indices = [description.indexOf("Your tree is ") + 13, description.indexOf("ft")];
|
const indices = [description.indexOf("Your tree is ") + 13, description.indexOf("ft")];
|
||||||
const treeHeightStr = description.slice(indices[0], indices[1]);
|
const treeHeightStr = description.slice(indices[0], indices[1]);
|
||||||
const treeHeightFloat = parseFloat(treeHeightStr).toFixed(1);
|
const treeHeightFloat = parseFloat(treeHeightStr).toFixed(1);
|
||||||
// Grab the tree's water timestamp
|
|
||||||
const waterTimestampStr = description.match(/<t:[0-9]+:R>/g)[0];
|
|
||||||
const waterTimestamp = waterTimestampStr.match(/[0-9]+/g);
|
|
||||||
if (isDev) console.log(`Water Timestamp: ${waterTimestamp}`);
|
|
||||||
|
|
||||||
// Return the info gathered
|
// Return the info gathered
|
||||||
return {
|
return {
|
||||||
treeName: treeName,
|
treeName: treeName,
|
||||||
treeHeight: treeHeightFloat,
|
treeHeight: treeHeightFloat
|
||||||
waterTimestamp: waterTimestamp
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -704,7 +696,6 @@ const functions = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async updateHandler(message) {
|
async updateHandler(message) {
|
||||||
// If we don't have the entire message yet, fetch it
|
|
||||||
if (message.partial) {
|
if (message.partial) {
|
||||||
message = await message.fetch().catch(e => {
|
message = await message.fetch().catch(e => {
|
||||||
throw e;
|
throw e;
|
||||||
@ -715,7 +706,7 @@ const functions = {
|
|||||||
// Check and store the message types
|
// Check and store the message types
|
||||||
const isLeaderboard = this.isLeaderboard(message);
|
const isLeaderboard = this.isLeaderboard(message);
|
||||||
const isTree = this.isTree(message);
|
const isTree = this.isTree(message);
|
||||||
// Check if the message is a leaderboard and handle the update
|
// Check if the message is a leaderboard
|
||||||
if (isLeaderboard) {
|
if (isLeaderboard) {
|
||||||
if (isDev) console.log(`LU: ${message.guild.name}`);
|
if (isDev) console.log(`LU: ${message.guild.name}`);
|
||||||
let guildInfo;
|
let guildInfo;
|
||||||
@ -771,35 +762,26 @@ const functions = {
|
|||||||
const comparedRankings = await functions.rankings.compare(guildInfo);
|
const comparedRankings = await functions.rankings.compare(guildInfo);
|
||||||
const embed = functions.builders.comparisonEmbed(comparedRankings, guildInfo);
|
const embed = functions.builders.comparisonEmbed(comparedRankings, guildInfo);
|
||||||
await compareMessage.edit(embed).catch(e => console.error(e));
|
await compareMessage.edit(embed).catch(e => console.error(e));
|
||||||
} else if (isTree) { // Check if the message is a tree
|
} else if (isTree) {
|
||||||
if (isDev) console.log(`TU: ${isTree.treeName}: ${isTree.treeHeight}ft`);
|
// Check if the message is a tree
|
||||||
|
// if (isDev) console.log(`TU: ${isTree.treeName}: ${isTree.treeHeight}ft`);
|
||||||
let guildInfo;
|
let guildInfo;
|
||||||
// Default to not updating the database
|
|
||||||
let doDbUpdate = false;
|
let doDbUpdate = false;
|
||||||
// Check if the bot has the guildInfo for this Guild already
|
|
||||||
if (message.client.guildInfos.has(message.guildId)) {
|
if (message.client.guildInfos.has(message.guildId)) {
|
||||||
guildInfo = message.client.guildInfos.get(message.guildId);
|
guildInfo = message.client.guildInfos.get(message.guildId);
|
||||||
// If the name or height has changed, update the guildInfo and flag to run a database update
|
|
||||||
if ((guildInfo.treeName != isTree.treeName) || (guildInfo.treeHeight != isTree.treeHeight)) {
|
if ((guildInfo.treeName != isTree.treeName) || (guildInfo.treeHeight != isTree.treeHeight)) {
|
||||||
guildInfo.setTreeInfo(isTree.treeName, isTree.treeHeight, message.channel.id, message.id);
|
guildInfo.setTreeInfo(isTree.treeName, isTree.treeHeight, message.channel.id, message.id);
|
||||||
doDbUpdate = true;
|
doDbUpdate = true;
|
||||||
}
|
}
|
||||||
// If the waterTimestamp has changed, update the database
|
} else {
|
||||||
// TODO... lost motivation
|
|
||||||
} else { // If the bot doesn't have a guildInfo for the Guild, we will create one for it and flag a database update
|
|
||||||
guildInfo = new GuildInfo().setIds(message.guildId, message.guild.ownerId)
|
guildInfo = new GuildInfo().setIds(message.guildId, message.guild.ownerId)
|
||||||
.setTreeInfo(isTree.treeName, isTree.treeHeight, message.channel.id, message.id);
|
.setTreeInfo(isTree.treeName, isTree.treeHeight, message.channel.id, message.id);
|
||||||
doDbUpdate = true;
|
doDbUpdate = true;
|
||||||
}
|
}
|
||||||
// If the database update flag is set, update the database and rebuild the guildInfo collection
|
|
||||||
// TODO: This should likely only update the relevant guildInfo in the future.
|
|
||||||
// Actually, rebuilding the collection should be unnecessary, since it's already been updated.
|
|
||||||
if (doDbUpdate) {
|
if (doDbUpdate) {
|
||||||
const query = guildInfo.queryBuilder("setTreeInfo");
|
const query = guildInfo.queryBuilder("setTreeInfo");
|
||||||
await dbfn.setGuildInfo(query);
|
await dbfn.setGuildInfo(query);
|
||||||
// I've commented this out to see if it breaks anything.
|
await functions.collectionBuilders.guildInfos(message.client);
|
||||||
// Rebuilding shouldn't be necessary and is a waste of resources.
|
|
||||||
// await functions.collectionBuilders.guildInfos(message.client);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -885,7 +867,7 @@ const functions = {
|
|||||||
throw "ERRNOGUILD"
|
throw "ERRNOGUILD"
|
||||||
});
|
});
|
||||||
// Fetch the Channel
|
// Fetch the Channel
|
||||||
const channel = await guild.channels.fetch(guildInfo.watchChannelId).catch(e => { throw "ERRNOCHANNEL" });
|
const channel = await guild.channels.fetch(guildInfo.watchChannelId);
|
||||||
// Create the filter function
|
// Create the filter function
|
||||||
const filter = message => {
|
const filter = message => {
|
||||||
// Discard any messages sent by Silvanus
|
// Discard any messages sent by Silvanus
|
||||||
@ -1064,9 +1046,9 @@ const functions = {
|
|||||||
},
|
},
|
||||||
async sendWaterReminder(guildInfo, message, channelId, guild) {
|
async sendWaterReminder(guildInfo, message, channelId, guild) {
|
||||||
const reminderChannel = await guild.channels.fetch(channelId);
|
const reminderChannel = await guild.channels.fetch(channelId);
|
||||||
const reminderEmbed = functions.builders.waterReminderEmbed(message, guildInfo);
|
// const reminderEmbed = functions.builders.waterReminderEmbed(message, guildInfo);
|
||||||
if (isDev) console.log(`WR: ${guild.name}: ${guildInfo.treeName}`);
|
if (isDev) console.log(`WR: ${guild.name}: ${guildInfo.treeName}`);
|
||||||
await reminderChannel.send(reminderEmbed).then(async m => {
|
await reminderChannel.send(message).then(async m => {
|
||||||
if (!m.deletable) return;
|
if (!m.deletable) return;
|
||||||
await this.sleep(500).then(async () => {
|
await this.sleep(500).then(async () => {
|
||||||
await m.delete().catch(e => console.error(e));
|
await m.delete().catch(e => console.error(e));
|
||||||
@ -1077,9 +1059,9 @@ const functions = {
|
|||||||
},
|
},
|
||||||
async sendFruitReminder(guildInfo, message, channelId, guild) {
|
async sendFruitReminder(guildInfo, message, channelId, guild) {
|
||||||
const reminderChannel = await guild.channels.fetch(channelId);
|
const reminderChannel = await guild.channels.fetch(channelId);
|
||||||
const reminderEmbed = functions.builders.fruitReminderEmbed(message, guildInfo);
|
// const reminderEmbed = functions.builders.fruitReminderEmbed(message, guildInfo);
|
||||||
if (isDev) console.log(`FR: ${guild.name}: ${guildInfo.treeName}`);
|
if (isDev) console.log(`FR: ${guild.name}: ${guildInfo.treeName}`);
|
||||||
await reminderChannel.send(reminderEmbed).then(async m => {
|
await reminderChannel.send(message).then(async m => {
|
||||||
if (!m.deletable) return;
|
if (!m.deletable) return;
|
||||||
await this.sleep(500).then(async () => {
|
await this.sleep(500).then(async () => {
|
||||||
await m.delete().catch(e => console.error(e));
|
await m.delete().catch(e => console.error(e));
|
||||||
|
10
package.json
10
package.json
@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "silvanus",
|
"name": "silvanus",
|
||||||
"version": "1.3.0",
|
"version": "1.2.9",
|
||||||
"description": "The ultimate Grow A Tree companion bot!",
|
"description": "Grow A Tree Companion Bot",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://git.vfsh.dev/voidf1sh/silvanus.git"
|
"url": "git+https://github.com/voidf1sh/silvanus.git"
|
||||||
},
|
},
|
||||||
"author": "Skylar Grant",
|
"author": "Skylar Grant",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://git.vfsh.dev/voidf1sh/silvanus/issues"
|
"url": "https://github.com/voidf1sh/silvanus/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://git.vfsh.dev/voidf1sh/silvanus#readme",
|
"homepage": "https://github.com/voidf1sh/silvanus#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"discord.js": "^14.11.0",
|
"discord.js": "^14.11.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user