From 16ac8b176ed4bd0a2d74f460f3769fb6f51cb5c2 Mon Sep 17 00:00:00 2001 From: Skillz Date: Mon, 18 May 2020 08:11:29 -0400 Subject: [PATCH 1/2] reload events handlers --- README.md | 1 + module/client.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index d244836b5..df676d9b8 100644 --- a/README.md +++ b/README.md @@ -311,4 +311,5 @@ This section will list out all the available methods and functionality in the li ```ts .editBotsStatus(status, name, type) +updateEventHandlers(eventHandlers) ``` diff --git a/module/client.ts b/module/client.ts index 88e2cc0c5..1184f13c5 100644 --- a/module/client.ts +++ b/module/client.ts @@ -50,3 +50,7 @@ export default createClient; export const updateChannelCache = (key: string, value: Channel) => { cache.channels.set(key, value); }; + +export function updateEventHandlers(newEventHandlers: EventHandlers) { + eventHandlers = newEventHandlers +} From 8f7071ca428cc4023da7ce382a65ecd40f47156c Mon Sep 17 00:00:00 2001 From: Skillz Date: Mon, 18 May 2020 08:15:45 -0400 Subject: [PATCH 2/2] fmt --- module/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/client.ts b/module/client.ts index 1184f13c5..72ac230c7 100644 --- a/module/client.ts +++ b/module/client.ts @@ -52,5 +52,5 @@ export const updateChannelCache = (key: string, value: Channel) => { }; export function updateEventHandlers(newEventHandlers: EventHandlers) { - eventHandlers = newEventHandlers + eventHandlers = newEventHandlers; }