From 16bc78f676f8af407afa1308b1d88f533a0fde79 Mon Sep 17 00:00:00 2001 From: tommy Date: Tue, 8 Jul 2025 15:53:11 -0400 Subject: [PATCH] Add table.clear --- src/main.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.lua b/src/main.lua index 0728866..8eaadc6 100644 --- a/src/main.lua +++ b/src/main.lua @@ -5,6 +5,12 @@ local CommandCollector = require('./Modules/CommandCollector.lua') local Client = Discordia.Client():useApplicationCommands() Discordia.extensions() +table.clear = function(t) + for k in pairs(t) do + t[k] = nil + end +end + local MessageCommandCollector = CommandCollector.new('Message'):Collect() local SlashCommandCollector = CommandCollector.new('Slash'):Collect() local UserCommandCollector = CommandCollector.new('User'):Collect()