[GH-ISSUE #194] !e3 countdown command #40

Closed
opened 2026-02-15 15:54:46 -05:00 by yindo · 0 comments
Owner

Originally created by @Mhmmm on GitHub (Jan 29, 2019).
Original GitHub issue: https://github.com/RPCS3/discord-bot/issues/194

Hey, some users (me and @MsDarkLow mainly) would really appreciate some sort of E3 countdown that could be requested from bot and since I suck at GIT, I am not able to open a PR for this. Here is a working code that I wrote (change it to your liking). It would be awesome if someone would implement this functionality. No configuration is needed since E3 is always (let's hope it stays that way too) at the same time every year, so I made it future-proof.

    //E3 usually starts with MS at 20:00 utc
    msg = "";
    DateTime e3 = new DateTime((DateTime.Now.Month >= 6 && DateTime.Now.Day > 11) ? DateTime.Now.Year + 1 : DateTime.Now.Year, 6, 11, 20, 0, 0).ToUniversalTime();
    TimeSpan e3left = e3.Subtract(DateTime.Now.ToUniversalTime());

    if ((DateTime.Now.ToUniversalTime().DayOfYear > 162) && (DateTime.Now.ToUniversalTime().DayOfYear <= 166))
    {
        msg = "E3 " + DateTime.Now.ToUniversalTime().Year + " is happening right now!";
    }
    else
    {
        msg = "E3 " + e3.Year + " starts with Microsoft's conference on " + e3.ToShortDateString()
            + Environment.NewLine + "Time to E3: " + ((e3left.Days > 0) ? e3left.Days + " days, " : "") + e3left.Hours + " hours, " + e3left.Minutes + " minutes left.";
    }
Originally created by @Mhmmm on GitHub (Jan 29, 2019). Original GitHub issue: https://github.com/RPCS3/discord-bot/issues/194 Hey, some users (me and @MsDarkLow mainly) would really appreciate some sort of E3 countdown that could be requested from bot and since I suck at GIT, I am not able to open a PR for this. Here is a working code that I wrote (change it to your liking). It would be awesome if someone would implement this functionality. No configuration is needed since E3 is always (let's hope it stays that way too) at the same time every year, so I made it future-proof. ```cs //E3 usually starts with MS at 20:00 utc msg = ""; DateTime e3 = new DateTime((DateTime.Now.Month >= 6 && DateTime.Now.Day > 11) ? DateTime.Now.Year + 1 : DateTime.Now.Year, 6, 11, 20, 0, 0).ToUniversalTime(); TimeSpan e3left = e3.Subtract(DateTime.Now.ToUniversalTime()); if ((DateTime.Now.ToUniversalTime().DayOfYear > 162) && (DateTime.Now.ToUniversalTime().DayOfYear <= 166)) { msg = "E3 " + DateTime.Now.ToUniversalTime().Year + " is happening right now!"; } else { msg = "E3 " + e3.Year + " starts with Microsoft's conference on " + e3.ToShortDateString() + Environment.NewLine + "Time to E3: " + ((e3left.Days > 0) ? e3left.Days + " days, " : "") + e3left.Hours + " hours, " + e3left.Minutes + " minutes left."; } ```
yindo added the fun stuff label 2026-02-15 15:54:46 -05:00
yindo closed this issue 2026-02-15 15:54:46 -05:00
yindo changed title from !e3 countdown command to [GH-ISSUE #194] !e3 countdown command 2026-06-05 15:25:01 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RPCS3/discord-bot#40