From d920f0ffc65d1e9dfdbbc5a385260ff416f68897 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 25 Nov 2019 23:42:03 +0100 Subject: [PATCH] Update to new library --- commands/owner/rtweet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/owner/rtweet.js b/commands/owner/rtweet.js index 73d02fab..f6957c8e 100644 --- a/commands/owner/rtweet.js +++ b/commands/owner/rtweet.js @@ -1,5 +1,5 @@ const { Command } = require('discord-akairo'); -const Twitter = require('twitter-lite'); +const Twit = require('twit'); const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret } = require('../../config.json'); class rtweetCommand extends Command { @@ -26,14 +26,14 @@ class rtweetCommand extends Command { async exec(message, args) { let text = args.text; try { - let client = new Twitter({ + let T = new Twit({ consumer_key: twiConsumer, consumer_secret: twiConsumerSecret, - access_token_key: twiToken, + access_token: twiToken, access_token_secret: twiTokenSecret }); - client.post('statuses/destroy', { + T.post('statuses/destroy', { id: text }); return message.channel.send('Tweet have been deleted!');