forked from Supositware/Haha-Yes
Update to new library
This commit is contained in:
parent
a6d1adf657
commit
d920f0ffc6
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const Twitter = require('twitter-lite');
|
const Twit = require('twit');
|
||||||
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret } = require('../../config.json');
|
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret } = require('../../config.json');
|
||||||
|
|
||||||
class rtweetCommand extends Command {
|
class rtweetCommand extends Command {
|
||||||
|
@ -26,14 +26,14 @@ class rtweetCommand extends Command {
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
let text = args.text;
|
let text = args.text;
|
||||||
try {
|
try {
|
||||||
let client = new Twitter({
|
let T = new Twit({
|
||||||
consumer_key: twiConsumer,
|
consumer_key: twiConsumer,
|
||||||
consumer_secret: twiConsumerSecret,
|
consumer_secret: twiConsumerSecret,
|
||||||
access_token_key: twiToken,
|
access_token: twiToken,
|
||||||
access_token_secret: twiTokenSecret
|
access_token_secret: twiTokenSecret
|
||||||
});
|
});
|
||||||
|
|
||||||
client.post('statuses/destroy', {
|
T.post('statuses/destroy', {
|
||||||
id: text
|
id: text
|
||||||
});
|
});
|
||||||
return message.channel.send('Tweet have been deleted!');
|
return message.channel.send('Tweet have been deleted!');
|
||||||
|
|
Loading…
Reference in a new issue