Sha256: d33e4f8ab497768ac3fe524565552c5736917ad505db16c125a1e3b9b363b812
Contents?: true
Size: 1019 Bytes
Versions: 4
Compression:
Stored size: 1019 Bytes
Contents
# frozen_string_literal: true require "discorb" client = Discorb::Client.new client.once :standby do puts "Logged in as #{client.user}" end client.user_command("Info", guild_ids: [857_373_681_096_327_180]) do |interaction| interaction.post(embed: Discorb::Embed.new( "Information of #{interaction.target.to_s_user}", fields: [ Discorb::Embed::Field.new("User", interaction.target.to_s_user), Discorb::Embed::Field.new("ID", interaction.target.id), Discorb::Embed::Field.new("Bot", interaction.target.bot? ? "Yes" : "No"), Discorb::Embed::Field.new("Joined at", interaction.target.joined_at.to_df("F")), Discorb::Embed::Field.new("Created at", interaction.target.created_at.to_df("F")) ], thumbnail: interaction.target.avatar&.url, ), ephemeral: true) end client.run(ENV["DISCORD_BOT_TOKEN"])
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.16.0 | examples/commands/inspect.rb |
discorb-0.15.1 | examples/commands/inspect.rb |
discorb-0.15.0 | examples/commands/inspect.rb |
discorb-0.14.0 | examples/commands/inspect.rb |