refactor(arabot): remove the need for container

This commit is contained in:
smyalygames 2022-10-26 03:34:54 +01:00
parent 4d819d87d2
commit 8c06bb6b88

View File

@ -17,7 +17,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { container, Listener } from '@sapphire/framework'; import { Listener } from '@sapphire/framework';
import type { import type {
VoiceState, CategoryChannel, VoiceChannel, TextChannel, VoiceState, CategoryChannel, VoiceChannel, TextChannel,
} from 'discord.js'; } from 'discord.js';
@ -48,9 +48,8 @@ class VerificationLeaveVCListener extends Listener {
let verifier = false; let verifier = false;
// Check for undefined variables // Check for undefined variables
const { client } = container;
const { channel } = oldState; const { channel } = oldState;
const guild = client.guilds.cache.get(newState.guild.id); const { guild } = newState;
if (channel === null || guild === undefined) { if (channel === null || guild === undefined) {
console.error('Verification channel not found'); console.error('Verification channel not found');