-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# duelbot | ||
|
||
a quiz bot for discord with a twist | ||
a quiz bot for discord with a twist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const { _, channelid } = require('../config.json') | ||
|
||
module.exports = { | ||
name: 'user-info', | ||
description: "Gives the information about the user", | ||
execute: async(message, args) => { | ||
if (message.channel.id == channelid) { | ||
message.channel.send(`Your username: ${message.author.username}\nYour ID: ${message.author.id}`) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const { _, channelid } = require('../config.json') | ||
const querystring = require('querystring') | ||
|
||
module.exports = { | ||
name: 'yoda-translate', | ||
description: 'Translates a string to how Yoda would say it', | ||
execute: async(message, args) =>{ | ||
if (message.channel.id == channelid) { | ||
if (!args.length) { | ||
return message.channel.send("You need to specify some text to convert"); | ||
} | ||
const query = querystring.stringify({ term: args.join(' ') }); | ||
const { _, content } = await fetch(`https://api.funtranslations.com/translate/yoda.json?text=${query}`); | ||
message.channel.send(content.translated); | ||
} | ||
} | ||
} |