forked from Supositware/Haha-Yes
write the file correctly
This commit is contained in:
parent
4dc3612986
commit
3a505e4cd9
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class fakebotCommand extends Command {
|
||||||
if (!fs.existsSync(`./webhook/${message.guild.id}_${message.channel.id}.json`)) {
|
if (!fs.existsSync(`./webhook/${message.guild.id}_${message.channel.id}.json`)) {
|
||||||
message.channel.createWebhook('fakebot')
|
message.channel.createWebhook('fakebot')
|
||||||
.then(webhook => {
|
.then(webhook => {
|
||||||
fs.writeFile(`./webhook/${message.guild.id}.json`, `{"id": "${webhook.id}", "token": "${webhook.token}", "channel": "${message.channel.id}"}`, function (err) {
|
fs.writeFile(`./webhook/${message.guild.id}_${message.channel.id}.json`, `{"id": "${webhook.id}", "token": "${webhook.token}", "channel": "${message.channel.id}"}`, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue