Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
dispherical committed Jun 13, 2024
1 parent 9be8a74 commit 327fb93
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions commands/optout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const prisma = new PrismaClient();
* @param {{app: import('@slack/bolt').App}} param1
*/
module.exports = async function ({ app }) {
app.command("/optout-directory", async ({ command, body, ack, respond }) => {
app.command("/optout-library", async ({ command, body, ack, respond }) => {
await ack();
const channelId = body.channel_id;
const channel = await app.client.conversations.info({
Expand Down Expand Up @@ -34,7 +34,7 @@ module.exports = async function ({ app }) {
"This channel cannot be locked as it is locked in the database. Usually, this is because it is a public, community-owned channel, i.e. #lounge, #code, etc.",
);
else if (channelRecord.optout)
return await respond("This channel is already opted out of directory.");
return await respond("This channel is already opted out of the library.");
else
await prisma.channel.update({
where: {
Expand All @@ -47,7 +47,7 @@ module.exports = async function ({ app }) {
await app.client.chat.postEphemeral({
channel: channel.channel.id,
user: command.user_id,
text: "This channel has been removed from the directory. Please allow up to 1 hour for all data to be flushed.",
text: "This channel has been removed from the library. Please allow up to 1 hour for all data to be flushed.",
});
if (channel.channel.is_member)
await app.client.conversations.leave({
Expand Down
3 changes: 2 additions & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ module.exports = {
"CNMU9L92Q", // #confessions (reasons are obvious)
"CCZ5LRL6P", // #politics (reasons are obvious)
"C0159TSJVH8", // #what-is-my-slack-id
"C077R6LC3C1", // #directory (this bot!)
"C077R6LC3C1", // #diredctory
"CT0BV6UMV", // #confessions-meta,
"C0188CY57PZ", // #meta
"C01T5J557AA", // #ssh-chat-bridge (banned users use this)
"C02GK2TVAVB", // #temp-email
"C078Q8PBD4G", // #library

// Here's a list of bot channels/spammy channels
// This goes here in order to prevent the indexing of artificially inflated rankings
Expand Down
2 changes: 1 addition & 1 deletion utils/joinall.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = async function ({ app, client }) {
});
await app.client.chat.postMessage({
channel: channel.id,
text: `Nice channel you got there. I'm librarian, which is created by HQ to help people find new and active channels. No message data is collected/stored, just how many messages are sent in a certain timeframe. If you do not want me in this channel and you do not want your channel in #directory, please run the command /optout-directory.`,
text: `Nice channel you got there. I'm Librarian, which is created by HQ to help people find new and active channels. No message data is collected/stored, just how many messages are sent in a certain timeframe. If you do not want me in this channel and you do not want your channel in #directory, please run the command /optout-directory.`,
});
resolve();
}, 1000);
Expand Down
2 changes: 1 addition & 1 deletion utils/redo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = async function ({ app, client }) {
);
const tmesg = await app.client.chat.postMessage({
channel: process.env.SLACK_CHANNEL,
text: "Loading drectory",
text: "Loading library",
});
await client.set("messageId", tmesg.ts);
};

0 comments on commit 327fb93

Please sign in to comment.