Перейти к содержимому

Как пользоваться ботом mirai в дискорде

  • автор:

Name already in use

Work fast with our official CLI. Learn more about the CLI.

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Discord bot that simply counts down from a set number of days. My first Python discord bot! and also my first application command bot smh

This project was birthed in a mix of wanting to learn Python and (trying) to automate my daily countdown. For a while, I’ve been manually setting my status from a certain day and updating it daily downwards as the days pass. The reasoning behind it is it merely acts as a way to keep me in check and productive to my pre-determined goal within that timeframe. Was this effective? Well, yes and no. I find it does help having a timer that progressively decreases; keeps yourself accountable. On the other hand, it’s such a hassle to have to update my discord status every single day.

You may be asking, why suffer through that and just find an actual product that specialises in countdowns? Well that’s definitely the sensible choice, the better choice which will yield better productivity even but I’m not sure if it’ll work for me. I’m a big believer that motivation comes easiest when it’s convenient. And since I basically have discord open all the time and I like building discord bots; why not automate that with a bot with a new learnt language: Python

Mirai Commands

These are the commands supported by Mirai, our chat bot.

General Commands

  • !clan — Returns information about the clan you’re in.
  • !mirai — Meet our bot, Mirai!
  • !roll — Returns a random number from 0 to 100.
  • !roll <num> — Returns a random number from 0 to .
  • !help — Display help message.
  • !ping — Check your connection to the server.
  • !AutoLast — Will automatically give a !last prompt on score submission.
  • !linkdiscord — Provides integration with Discord bot to link discord account to Atoka account.
  • !unlinkdiscord — Unlinks currently linked Discord account.
  • !pp <mode> — Show your current pp. If mode is not present, FokaBot will tell you the amount of PP for your current game mode. If mode is present (it can be std/taiko/ctb/mania ), FokaBot will tell you the amount of PP for that gamemode. This command works only in PMs

FAQ Commands

  • !faq rules
  • !faq swearing
  • !faq spam
  • !faq offend
  • !faq english
  • !faq github
  • !faq discord
  • !faq blog
  • !faq changelog
  • !faq status

Tillerino-like Commands

Mirai has some commands similar to Tillerino. Those commands work only if you send them to Mirai through a PM. Remember that PP system has been implemented only on osu!standard, osu!mania and osu!ctb. The bot doesn’t support beatmaps recommendations at the moment, that functionality wil come later, hopefully.

Как пользоваться ботом mirai в дискорде

Mirai is used by sending chat messages in Discord with a certain format. All command for Mirai start with the prefix m. . For example, to generate a random number you would do m.random , which would then return a number from 1 to 10. For a full list of commands go to the commands list.

Advanced Usage:
An argument displayed as [name] is optional, and one displayed as <name> is required.
Another way of passing arguments to a command is through named arguments. This is done in the format of —name value or -n value

A requestable Managed Role can easily accomplish this. First create a role, preferably with the channel’s name, that lets users view a channel. Then go to your server’s dashboard and add a new role. Set this role to the one you just created and set the type of request. Now users can add and remove that role with m.role add/remove <role name>

In the channel’s permissions create a rule for Mirai (or a bot role) with "Read Messages" denied.

Currently, no. This is something we want to add in the future, but it’s a difficult issue to solve.

Downloading, re-encoding, and sending voice data to Discord is expensive. To make sure we have enough resources for everyone we end music players that are not currently in use.

On your server’s dashboard there is a "Welcome Messages" section. Simply type in your message and select a channel, or choose Direct Messages. To include text like the user’s name click the question mark.

While Discord-like mentions are planned to be supported, in the mean time you will need to format them as real mentions. The easiest way to see this is to place a backslash in front of a mention and send it. The result should look like this: User: <@125367104336691200> Channel: <#125367104336691200> Role: <@&125367104336691200>

On your server’s dashboard, under the channel-specific settings, there is a "Message of the Day" section. You can enter the message you want to be displayed, and then input the hourly interval for it to be posted.

As seen on the commands page, airing notificiation commands for a channel must be in the form m.airing notify channel . For example, if you want to get notifications for an anime you would type m.airing notify channel anime_name , and to stop getting notified you would type m.airing notify channel stop anime_name .

Any user with the "Manage Channel(s)" permission can use disabled commands.

No. Mirai is a user like anyone else. You can’t change a user’s global avatar.

Oh, you meant the code? Unfortunately Mirai is closed-source. We do this for reasons such as protecting our code from being stolen by other bots.

Как пользоваться ботом mirai в дискорде

Displays a user’s most recent scores.
Note that this command will not show PP, and will not show scores older than 24 hours.

If your username is already configured then it can be omitted.
To set the game mode add mode. . Example: mode:mania or mode:ctb (default: standard)

Displays a user’s top scores.

If your username is already configured then it can be omitted.
To set the game mode add mode. . Example: mode:mania or mode:ctb (default: standard)

Generates an osu! «signature» for a user.

If your username is already configured then it can be omitted.
To change the background color specify a hexadecimal color like so: color:00ff44 (default: ff66aa )
To set the game mode add mode. . Example: mode:mania or mode:ctb (default: standard)
Color can be shortened to c: , and mode to m:

Aliases: sig, image

Displays a user’s osu! profile stats.

If your username is already configured then it can be omitted.
To set the game mode add mode. . Example: mode:mania or mode:ctb (default: standard)

Aliases: user, stats

Binds the music player to a text channel.

When a music player is bound to a text channel it will only accept commands from that channel. Now playing messages and other notices will also be sent there.
To unbind a music player use unbind

Not available in DMs

Checks what song is playing.

Aliases: np, playing

Not available in DMs

Sets the volume of the music player (Mirai Bot Pro).

The volume can be any number from 1 to 80. By default Pro music players are set to 20.

Not available in DMs

Resumes the music player.

Not available in DMs

Pauses the music player.

Not available in DMs

Skips the current track.

Not available in DMs

Manages you music player’s queue.

Add track or stream: m.music queue
List tracks in queue: m.music queue list
Clear queue: m.music queue clear

Not available in DMs

Gets rid of the server’s music player. This will also empty the queue for the player.

Aliases: sp, leave

Not available in DMs

Creates a music player for a server. If no voice channel is given, it will join the channel you are connected to.

To bind the music player to a text channel mention it channel after the voice channel. When a music player is bound to a text channel it will only accept commands from that channel, and now playing messages and other notices will be sent there.

Aliases: j, start

Not available in DMs

Stop getting notifications about a twitch channel.

Required Permission: Manage Channel

Not available in DMs

Check which Twitch channels this channel gets notifications for.

Aliases: channels, followed

Not available in DMs

Get notified when someone starts streaming on Twitch.
Users must have link previews enabled to see these.

Required Permission: Manage Channel

Not available in DMs

Get information about a Twitch channel, and their stream. The channel name must be the same as in the URL of the channel.

Not available in DMs

An accurate rating of your waifu or husbando.

Can be used on users or anime characters.
Many character’s ratings are based on contests.

Aliases: rate, waifu

Gets information about a manga or light novel.
This command will only post adult series if NSFW is enabled.

Data source: AniList

Aliases: novel, ln

Gets info about an anime/manga/novel character.
Data source: AniList

Aliases: char, anichar

Gets information about an anime.
Data source: AniList
This command will only post adult anime if NSFW is enabled.

Find out when an anime is airing, or what’s airing on a specific day of the week. All times are UTC+9 (JST) by default.

Check which episode airs next and when: m.airing anime_name
Check what’s airing on a specific day: m.airing today or m.airing tomorrow or m.airing

You can also enable notifications for every time an episode airs.
Subscribe: m.airing notify anime_name or for a channel m.airing notify channel anime_name
Unsubscribe: m.airing notify stop anime_name or for a channel m.airing notify channel stop anime_name
List subscribed: m.airing notify list or for a channel m.airing notify channel list

Kicks a user from the server and clears their messages from the past 3 days.

Required Permission: Ban Members

Not available in DMs

Get or remove a managed role, or list all managed roles.

Add role: role add/join name
Remove role: role remove/leave name
List requestable roles: role list
To see all managed roles instead of just joinable ones, use m.role list all

Not available in DMs

Deletes certain messages from a channel. You can use the options below to identify what messages you want deleted.
Remember that the number given is how many messages Mirai will go through, not how many will be deleted.
There is a limit of 500 messages. Pinned messages will not be deleted by default.
To specify multiple conditions separate the conditions with a | .

Options:
-c . | —contains . Messages containing the following text (surround with quotes if containing a dash).
-i | —invites Messages containing an invite.
-u @user | —user @user Messages sent by @user (or by «user») (surround with quotes if containing a dash).
-b | —bots Messages sent by bots.
-a | —attachments Messages containing an attachment (file/image).
-li | —links Messages containing a link.
-le # | —length # Messages longer than the specified length.
-p | —pinned Also delete pinned messages (affects all conditions).
-s | —silent Don’t display success message after pruning (affects all conditions).

Aliases: purge, delete

Required Permission: Manage Messages

Not available in DMs

Shows what permissions a member has.

To check server-wide permissions add —server to the end.
To shows all permissions instead of just granted ones, add —all to the end.

Not available in DMs

Kicks a user and provides them a reason.

Required Permission: Kick Members

Not available in DMs

Bans a user who isn’t on the server.

This command works the same way as the ban command, but uses a user ID instead of a mention.

Required Permission: Ban Members

Not available in DMs

Bans a user and sends sends them the reason.

Required Permission: Ban Members

Not available in DMs

Commands relating to Mirai Bot Pro.

m.pro upgrade , m.pro go
Select a key to upgrade the server with.
m.pro downgrade
Unassign the key used for the server.
m.pro claim
Claim a pro key. This is mainly used for giveaways.
m.pro info
Learn what Mirai Bot Pro gives you.
m.pro tldr
Shorter info.
m.pro status , m.pro server status
Check your pro status.
m.pro key
Get information about a certain key.

Checks what the weather is anywhere in the world.
If no location is given then your configured location will be used.

If you want to hide the location then add —hidden to the end. Your message will be deleted if possible.
This can be done by default by enabling the «Hide weather location» option on the dashboard.

This command is limited to 15 uses per day.
Attention: DarkSky has been acquired by Apple and will shut down their API at the end of 2021. The future of this command is unclear.

Lets members vote on something.

To start a vote: m.vote start t:topic | option | option 2 | .
To end a vote: m.vote end
To check the running vote: m.vote check
To vote on an option: m.vote option

The default options are Yes and No .
To set a topic add t:The title here | before the options. If you have no options then you can just type the title.
When voting you can use the option’s number instead of typing it.
Only the user that created a vote and users with the Manage Channel permission can end a vote.

Not available in DMs

Gets a definition from Urban Dictionary.
Only works in NSFW channels.

Creates a strawpoll.

Each option is separated with a | .
To name the strawpoll add t:The title here | before the options.
If you want to make a poll in Discord instead, use the vote command.

Shows the status of the shard and cluster your server is on.

Aliases: ping, shard

Play rock paper scissors against Mirai.

Set and manage your reminders.

To set a reminder: m.reminder 0m 0d 0h 0m 0s | reminder_text
To list your reminders: m.reminder list
To remove a reminder: m.reminder remove text_in_reminder

You can have a maximum of 20 reminders, with a maximum length of one year.

Aliases: remind, reminders

Gets a post from reddit.
If you would like to search for a post then add a query to the command.

Any of these options can be added to the end of the command:
—time=timeframe hour, day, week, month, year, or all. Only works with top and controversial sorting (default: day for random, week for search)
—limit=number The number of posts to randomly pick from or to search between 1 and 50 (default: 25)
—type=self or —type=link Only get self or link posts
—sort=mode hot, new, top, or controversial (default: top)
—no-embed Will not embed the link in chat

If the channel is a NSFW channel then NSFW posts can be retrieved.

Gets a random comic from explosm.net’s Random Comic Generator. Only works in NSFW channels.

Aliases: rcg, comic

Generates a random number.

By default it generates a number from 1-10. You can specify a maximum or range.

Aliases: roll, rand, rng

Shows a map of a location.

To specify a zoom level use —zoom level , with level being a number from 1 to 20.
To specify a map type use —type type , with type being one of road, roadmap, sat, satellite, terrain, or hybrid.

Shows the members of a role. If there are more than 30 members in a role, names will not be shown.

Not available in DMs

To get info on a user input their name or mention them.
To get info on a channel mention it with #channel-name (for voice channels use ).
To get info on the server input server .

Not available in DMs

Creates and manages giveaways.

To start a giveaway use m.giveaway create . This will open the giveaway creator where you can choose its settings.
You can also use this shortcut to quickly create a giveaway: m.giveaway create [#channel] [prize] [duration] [num winners] .
Giveaways are limited to one per user per channel. All commands have a channel argument which is optional.

Giveaways can be customized with these options:
Prize : Tells users what the giveaway is for (ex: A free t-shirt).
Channel : The channel a giveaway will be posted in. By default the current channel is used.
Duration : How long the giveaway will be open for (ex: 30m).
Winners : How many winners will be selected when the giveaway ends or is manually ended (min-max: 1-25).
Emote : The emote users will react with to enter the giveaway.
Minimum Account Age : The number of days an account must have existed for to enter the giveaway.
Allowed Roles : Allows restricting entry to certain roles.
Giveaways with a duration will automatically end after that time. You will not be able to use any of the commands below.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *