Skip to content

Commit

Permalink
let's handle this on gmod side
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed Jun 13, 2024
1 parent f8814a0 commit 802a018
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/services/gamebridge/payloads/StatusPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ const getRandomActivity = (gamemode: string) => {
export default class StatusPayload extends Payload {
protected static requestSchema = requestSchema;
private static retryCount = 0;
private static lastStatusUpdate: boolean[] = [];

static async initialize(): Promise<void> {
setInterval(() => {
this.lastStatusUpdate.splice(0, this.lastStatusUpdate.length);
}, 1000 * 5);
}

static async handle(payload: StatusRequest, server: GameServer): Promise<void> {
super.handle(payload, server);
Expand Down Expand Up @@ -120,10 +113,6 @@ export default class StatusPayload extends Payload {
const guild = discord.guilds.cache.get(discord.config.bot.primaryGuildId);
if (!guild) return;

if (players && this.lastStatusUpdate.length > 5) return; // burst prevention

if (players) this.lastStatusUpdate.push(true);

// Nick
if (discord.user) {
const me = guild.members.cache.get(discord.user.id);
Expand Down

0 comments on commit 802a018

Please sign in to comment.