question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mute/tempbans, etc. durations are 1 second off in bot's messages and DMs

See original GitHub issue

Issue

Every mute, temp-ban or anything that has a time (when displayed) always 1 second off.

Example

@ERROR was muted for 2 days (1 day, 23 hours). The (1 day, 23 hours) isn’t required alt text

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AFK-debug-9commented, Apr 25, 2022

This is something I’ve noticed with discord relative timestamps in general. Even if you do time = 0 it will say Dec 31 1969.

time += 1
1reaction
mbaruhcommented, Apr 23, 2022

To give some context, the duration in parentheses is calculated after the infraction is added to the database. In a very rare case we had some latency and a 10 minute mute was applied 6 minutes after it was added to the database. In that case we were told the mute will last 4 minutes, which is correct.

That said, it doesn’t seem like a very compelling reason to keep this behavior. I’m ok with just using the supplied duration as-is, or maybe we could add a check to make sure the delta is no greater than a few seconds to account for edge cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Midjourney Documentation
DMing the Bot (Direct Messaging). Q: How do I DM the bot? A: The easiest way to initiate a DM conversation with the...
Read more >
How to Disable Direct Messages on Discord - YouTube
How to disable direct messages on Discord? In this tutorial, I show you how to turn off direct messages in Discord on a...
Read more >
Discord bot editing messages too slow - Stack Overflow
Deleting messages falls under a separate, higher rate limit so that bots are able to ... //syntax: await wait(1000); to "pause" for 1...
Read more >
User Guide | PluralKit
PluralKit's user guide contains a walkthrough of the bot's features, as well as how to use them.
Read more >
Rate limiting for bots - Teams | Microsoft Learn
Rate limiting is a method to limit messages to a certain maximum frequency. As a general principle, your application must limit the number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found