mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-12-21 03:58:05 +01:00
refactor(arabot): remove the need for container
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
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 {
|
||||
VoiceState, CategoryChannel, VoiceChannel, TextChannel,
|
||||
} from 'discord.js';
|
||||
@@ -48,9 +48,8 @@ class VerificationLeaveVCListener extends Listener {
|
||||
let verifier = false;
|
||||
|
||||
// Check for undefined variables
|
||||
const { client } = container;
|
||||
const { channel } = oldState;
|
||||
const guild = client.guilds.cache.get(newState.guild.id);
|
||||
const { guild } = newState;
|
||||
|
||||
if (channel === null || guild === undefined) {
|
||||
console.error('Verification channel not found');
|
||||
|
||||
Reference in New Issue
Block a user