All Projects → DiscordBotPortalJP → dispander

DiscordBotPortalJP / dispander

Licence: MIT license
Discord Message URL Expander

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to dispander

Karuma
Karuma is a Discord Bot including Nukes, Raids, Mass DM and other features. Only for educational purposes 🥱🚀
Stars: ✭ 132 (+312.5%)
Mutual labels:  discordpy
DiscordChatExporterPy
A simple Discord chat exporter for Python Discord bots.
Stars: ✭ 72 (+125%)
Mutual labels:  discordpy
Chintu-Bot
ChintuBot is a multipurpose discord bot.
Stars: ✭ 17 (-46.87%)
Mutual labels:  discordpy
EpicBot
A simple, multipurpose Discord bot.
Stars: ✭ 130 (+306.25%)
Mutual labels:  discordpy
Fortnite-LobbyBot
No description or website provided.
Stars: ✭ 38 (+18.75%)
Mutual labels:  discordpy
mass-dm-discord
A MassDM selfbot which is working in 2021. Only for educational purposes 🥱🚀
Stars: ✭ 87 (+171.88%)
Mutual labels:  discordpy
bot
The official source code for the bot found in the Discord Extreme List Discord server!
Stars: ✭ 17 (-46.87%)
Mutual labels:  discordpy
DiscordStorage
Use Discord servers to store files
Stars: ✭ 64 (+100%)
Mutual labels:  discordpy
Neutron-Bot
A discord bot which aims to be the only bot a server will need.
Stars: ✭ 15 (-53.12%)
Mutual labels:  discordpy
Discord-multipurpose-bot
A repository with JavaScript and Python versions of the same type of discord commands.
Stars: ✭ 27 (-15.62%)
Mutual labels:  discordpy
nextcord
A Python wrapper for the Discord API forked from discord.py
Stars: ✭ 956 (+2887.5%)
Mutual labels:  discordpy
NanoBot
[Discontinued] A music, fun, Overwatch, and moderation bot written in discord.py.
Stars: ✭ 11 (-65.62%)
Mutual labels:  discordpy
Ren
As a mascot for the SFU Anime Club, Ren is our in-house Discord bot. Includes first/third party modules that are in use.
Stars: ✭ 16 (-50%)
Mutual labels:  discordpy
JukeBot
Discord music bot written in Python 3
Stars: ✭ 23 (-28.12%)
Mutual labels:  discordpy
discord2sheet-bot
Discord bot that stores messages to Google Sheet.
Stars: ✭ 40 (+25%)
Mutual labels:  discordpy
Spacebot
An open-source, multipurpose, configurable discord bot that does it all (that's the plan, at least)
Stars: ✭ 41 (+28.13%)
Mutual labels:  discordpy
yourAI
GPT-2 Discord Bot and Steps to Train Something Like You
Stars: ✭ 71 (+121.88%)
Mutual labels:  discordpy
discord-ui
A discord.py extension for sending, receiving and handling ui interactions in discord
Stars: ✭ 28 (-12.5%)
Mutual labels:  discordpy
Harmonbot
Multi-Platform Factotum Bot
Stars: ✭ 30 (-6.25%)
Mutual labels:  discordpy
tuxbot-bot
TuxBot, A discord bot write in python 🤖
Stars: ✭ 16 (-50%)
Mutual labels:  discordpy

dispander (Discord Message URL Expander)

DiscordのメッセージURLを検知して展開する機能を追加する discord.py Bot拡張用ライブラリ

使い方

python3 -m pip install dispander

extensionとして使用する場合

load_extensionで読み込んでください

from discord.ext import commands

bot = commands.Bot(command_prefix='/')
bot.load_extension('dispander')
bot.run(token)

関数として使用する場合

on_message内のどこかで実行してください。

展開したメッセージを消去する機能を使用するにはon_reaction_addイベントもしくはon_raw_reaction_addイベントのどちらかでdelete_dispand関数を実行してください。 on_raw_reaction_addの場合はキーワード引数payloadにRawReactionActionEventを、on_reaction_addの場合はキーワード引数userにUser、reactionにReactionを指定して下さい。

消去の際のリアクションを変更したい場合は環境変数DELETE_REACTION_EMOJIに絵文字を設定してください。

import discord
from dispander import dispand, delete_dispand

client = discord.Client()

@client.event
async def on_message(message):
    if message.author.bot:
        return
    await dispand(message)


@client.event
async def on_raw_reaction_add(payload):
    await delete_dispand(client, payload=payload)


client.run(token)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].