aboutsummaryrefslogtreecommitdiff
path: root/174bg/discord-bot/source/utilities/notifyRoleByName.js
diff options
context:
space:
mode:
authorAlex Pooley (@zuedev) <zuedev@gmail.com>2026-07-23 22:39:33 +0100
committerAlex Pooley (@zuedev) <zuedev@gmail.com>2026-07-23 22:39:33 +0100
commit4cccbdda3496aad74bdb3b4b2ad746f4367b13d9 (patch)
tree38f8d27bee36eab2295dc5a2b044e6075bd20faf /174bg/discord-bot/source/utilities/notifyRoleByName.js
parent2d7362b6fc73f4807f09f6f522fd2e1e2b306e04 (diff)
downloadunnamed-group-4cccbdda3496aad74bdb3b4b2ad746f4367b13d9.tar
unnamed-group-4cccbdda3496aad74bdb3b4b2ad746f4367b13d9.tar.gz
unnamed-group-4cccbdda3496aad74bdb3b4b2ad746f4367b13d9.tar.bz2
unnamed-group-4cccbdda3496aad74bdb3b4b2ad746f4367b13d9.tar.xz
unnamed-group-4cccbdda3496aad74bdb3b4b2ad746f4367b13d9.zip
opti refactor
Diffstat (limited to '174bg/discord-bot/source/utilities/notifyRoleByName.js')
-rw-r--r--174bg/discord-bot/source/utilities/notifyRoleByName.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/174bg/discord-bot/source/utilities/notifyRoleByName.js b/174bg/discord-bot/source/utilities/notifyRoleByName.js
deleted file mode 100644
index 1b2b82a..0000000
--- a/174bg/discord-bot/source/utilities/notifyRoleByName.js
+++ /dev/null
@@ -1,19 +0,0 @@
-export default async (guild, roleName, message) => {
- // get the role by name
- const role = guild.roles.cache.find(
- (role) => role.name.toLowerCase() === roleName.toLowerCase(),
- );
-
- if (!role) {
- console.error(`Role "${roleName}" not found.`);
- return;
- }
-
- // get all members with the role
- const membersWithRole = role.members;
-
- // send a DM to each member with the role
- for (const member of membersWithRole.values()) {
- await member.send(message);
- }
-};