Remove config.json
Remove config.json (not secure) and replace with .env.
Update deploy-commands.js:
- const { token, clientId } = require('./config.json');
+ const { token, clientId } = process.env;
Update index.js:
- const { token, clientId } = require('./config.json');
+ const token = process.env.TOKEN;
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = {
|
||||
const reason = interaction.options.getString('reason') || 'No reason provided';
|
||||
const durationInput = interaction.options.getString('duration');
|
||||
|
||||
await interaction.deferReply({ embeds: [embed] })
|
||||
await interaction.deferReply()
|
||||
|
||||
if (!target) return interaction.editReply({ content: 'No user specified!' });
|
||||
await interaction.guild.bans.create(target.id, { reason: `Banned by ${interaction.user.tag}: ${reason}` });
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = {
|
||||
.setRequired(true)),
|
||||
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply({ embeds: [embed] });
|
||||
await interaction.deferReply();
|
||||
|
||||
const member = interaction.options.getUser('membre');
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ module.exports = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers),
|
||||
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply({ embeds: [embed] });
|
||||
await interaction.deferReply();
|
||||
|
||||
const input = interaction.options.getString('user').trim();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user