Skip to content

Commit

Permalink
move to discord field in settings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Feb 6, 2024
1 parent 32e6b6e commit 055c0ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions helpers/getImages.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ const settings = require("@resources/settings.json");
* Convert AttachmentBuilder objects into sendable URLs
* @author RobertR11, Evorp
* @param {import("discord.js").Client} client
* @param {import("discord.js").AttachmentBuilder[]} fileArray files to commit
* @returns {Promise<string[]>} array of image urls from #submission-spam
* @param {import("discord.js").AttachmentBuilder[]} files files to get urls from
* @returns {Promise<string[]>} array of image urls
*/
module.exports = async function getImages(client, ...fileArray) {
module.exports = async function getImages(client, ...files) {
/** @type {import("discord.js").Message} */
const imgMessage = await client.channels.cache
.get(settings.channels.images)
.send({ files: fileArray });
.get(settings.discord.channels.images)
.send({ files });

return imgMessage.attachments.map((attachment) => attachment.url);
};
1 change: 0 additions & 1 deletion resources/strings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"bot": {
"error": "Action Failed",
"cant_dm": "I can't execute this command inside DMs!",
"missing_interaction": "This %INTERACTION% doesn't have an event set up yet!"
},
"command": {
Expand Down

0 comments on commit 055c0ed

Please sign in to comment.