mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 15:04:29 +02:00
refactor(arabot): remove the need for container
This commit is contained in:
parent
4d819d87d2
commit
8c06bb6b88
@ -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');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user