MCPcopy Create free account
hub / github.com/Slayer128/Carltech-Bot / removeFromMentionList

Function removeFromMentionList

lib/mention.js:71–86  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

69
70// Function to remove a mention from the list
71async function removeFromMentionList(url) {
72 try {
73 const data = loadMentionData();
74
75 // Check if the URL exists
76 if (data[url]) {
77 delete data[url]; // Remove the mention
78 saveMentionData(data);
79 console.log(`URL ${url} has been removed from the mention list.`);
80 } else {
81 console.log(`URL ${url} is not in the mention list.`);
82 }
83 } catch (error) {
84 console.error("Error while removing the mention from the list:", error);
85 }
86}
87
88// Exporting the functions for external use
89module.exports = {

Callers

nothing calls this directly

Calls 2

loadMentionDataFunction · 0.85
saveMentionDataFunction · 0.85

Tested by

no test coverage detected