Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local discordia = require('discordia')
- local client = discordia.Client()
- discordia.extensions()
- client:on('ready', function()
- print('Logged in as '.. client.user.username)
- end)
- client:on('messageCreate', function(message)
- if message.content == '!ping' then
- message.channel:send('Pong')
- end
- end)
- -- I will figure this out one day, at least I know how to do comments --
- client:on('messageCreate', function(message)
- if message.content == '!rickroll' then
- message.channel:send('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
- end
- end)
- client:on("messageCreate", function(message)
- local content = message.content
- local author = message.author
- -- below is the wip for a usercount command, --
- -- going to build it off of example embed from wiki; just need to figure out how to have the bot respond with users in guild --
- if content == "!usercount" then
- message:reply {
- user = {
- title = "Server Info",
- description = "usercount",
- author = {
- name = author.username,
- icon_url = author.avatarURL
- },
- fields = { -- array of fields
- {
- name = "=Count",
- value = "This is some information",
- inline = true
- },
- {
- name = "unused",
- value = "This is some more information",
- inline = false
- }
- },
- footer = {
- text = "Created with Discordia"
- },
- color = 0x000000 -- hex color code
- }
- }
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement