Эх сурвалжийг харах

Update message deletion timeout to 1 minute.

Oleksandr Korniienko 3 жил өмнө
parent
commit
7c5eeaba9d

+ 2 - 2
community-contributions/joystream-scoring-period-bot/src/bot-en.ts

@@ -33,7 +33,7 @@ const client = new Client();
 let nextSyncDate = moment();
 let scoringData = {} as ScoringPeriodData;
 let lastGradedPeriod = null as number | null;
-const messageDeletionTimeout = 30000; // 30 seconds
+const messageDeletionTimeout = 60000;
 
 client.login(discordToken);
 client.on("ready", async () => {
@@ -53,7 +53,7 @@ const loadScoringPeriodData = async () => {
 client.on("message", async (message) => {
   await reloadScoringData();
   if (message.content === "!help") {
-    const helpMessage = "I can help to know the state of Joystream scoring periods!\nIn channels I delete my messages after 30 seconds, but in dm they will be kept.\nSupported commands:\n!scoring - Get the scoring period information\n!help - get help";
+    const helpMessage = `Hello ${message.author.username}, I can help you with the status of Joystream Scoring Periods.\nIn channels I delete my messages after 30 seconds, but in DM they will be kept.\nSupported commands:\n!scoring - Get the scoring period information\n!help - Get this help`;
     message.channel.send({content: helpMessage}).then( (msg: { delete: () => void; }) => {
       if (message.channel.type !== "dm") {
         message.delete()

+ 1 - 1
community-contributions/joystream-scoring-period-bot/src/bot-ru.ts

@@ -37,7 +37,7 @@ interface ScoringPeriodData {
 let nextSyncDate = moment();
 let scoringData = {} as ScoringPeriodData;
 let lastGradedPeriod = null as number | null;
-const messageDeletionTimeout = 30000; // 30 seconds
+const messageDeletionTimeout = 60000; // 1 minute
 
 bot.on("message", async (msg: TelegramBot.Message) => {
   if (nextSyncDate.isBefore(moment())) {