fix(10grans): don't allow rain on tipbot
This commit is contained in:
parent
e916778c49
commit
7a9bac2bf4
1 changed files with 3 additions and 1 deletions
|
@ -2,7 +2,9 @@ exports.runQuery = async function (roomId, event, notice) {
|
||||||
if (config.fediverse.tipping === false) return matrixClient.sendHtmlNotice(roomId, `Tipping is not enabled.`, `<code>Tipping is not enabled.</code>`);
|
if (config.fediverse.tipping === false) return matrixClient.sendHtmlNotice(roomId, `Tipping is not enabled.`, `<code>Tipping is not enabled.</code>`);
|
||||||
const loadingString = `Making it rain for notice: ${notice}...`;
|
const loadingString = `Making it rain for notice: ${notice}...`;
|
||||||
const original = await matrixClient.sendHtmlNotice(roomId, `${loadingString}`, `<code>${loadingString}</code>`);
|
const original = await matrixClient.sendHtmlNotice(roomId, `${loadingString}`, `<code>${loadingString}</code>`);
|
||||||
const users = await fediverse.utils.getStatusMentions(notice, event, original);
|
const findAllUsers = await fediverse.utils.getStatusMentions(notice, event, original);
|
||||||
|
const exclude = "@10grans@fedi.cc";
|
||||||
|
const users = users.filter(users => !exclude.includes(findAllUsers))
|
||||||
if (!users) return matrix.utils.editNoticeHTML(roomId, original, `<code>No eligible users found.</code>`);
|
if (!users) return matrix.utils.editNoticeHTML(roomId, original, `<code>No eligible users found.</code>`);
|
||||||
const rain = (users) => {
|
const rain = (users) => {
|
||||||
amount = users.length * 0.00000001337 // by per user:
|
amount = users.length * 0.00000001337 // by per user:
|
||||||
|
|
Loading…
Reference in a new issue