A small library that helps verify credit transfers.
Project description
Probotlib
A small library that helps verify credit transfers.
How to use
You must first install the discord.py library.
pip install discord.py
You must first install the library.
pip install probotlib
Note
You should make credit command in probot in short c and the probot is in English.
Code example
import discord
from discord.ext import commands
from probotlib import Transfer
intents = discord.Intents.all()
client = commands.Bot(command_prefix="!", intents=intents)
@client.command()
async def buy(ctx):
role = ctx.guild.get_role()
user = ctx.author
#Add transfer data
trans = Transfer(owner_id="add owner id", probot_id="add probot id", amount="add amount", server_id="add server id")
#Get transfer embed
embed = trans.trans_embed(bot=client)
await ctx.send(embed=embed)
#Transfer process started
role_buy = await trans.trans_amount(ctx=ctx)
if role_buy:
await user.add_roles(role)
else:
await ctx.send("time is up")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
probotlib-1.6.tar.gz
(3.3 kB
view details)
File details
Details for the file probotlib-1.6.tar.gz.
File metadata
- Download URL: probotlib-1.6.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57bc571decabe5b3c9b02bb6af6816447e0cb29e64b16ca2b96eb89ef7956291
|
|
| MD5 |
848d671ad9bbd763c7bdacee66c4eb92
|
|
| BLAKE2b-256 |
9baf21863dca7314a3190b661498d996880e39601ffe0deb980c1877c6ef0a97
|