Untitled

mail@pastecode.io avatar
unknown
python
a year ago
3.9 kB
2
Indexable
import discord
from discord.ext import commands
import requests

intents = discord.Intents.all()

bot = commands.Bot(command_prefix='?', self_bot=True, intents=intents)

@bot.event
async def on_ready():
    print(f'Logged in as {bot.user.name}')

@bot.command()
async def paypal(ctx):
    message = """
## <:paypal:1102512241653325954> PayPal Payments

**Link:** [https://paypal.me/gesoodinaz](https://paypal.me/gesoodinaz)
**Email:** gesoodinazzz@gmail.com

Friends & Family
No Notes
Send Screenshot
"""
    await ctx.send(message)

@bot.command()
async def ltc(ctx):
    message = """
## <:ltc:1137943859465306122> Litecoin Payments

**Addy:** ltc1qq4sh8dp3efgnn0rw4ctswgmcrrzh9w0u7q383z

Send Screenshot or Transaction ID
"""
    await ctx.send(message)

@bot.command()
async def smg(ctx):
    message = """
## <a:golduzi:1136402988907368599> SMG SERVICE <a:golduzi:1136402988907368599>

**Services:**
- N1tr0
- M3mbers B0osting
- Cheap Accounts
- S3rver B0osts
- Minecraft Accounts

**Join now!!**
[https://discord.gg/smgservice](https://discord.gg/smgservice)
"""
    await ctx.send(message)

@bot.command()
async def vouchghoul(ctx):
    message = """
## <a:cash:1148729309708697680> Thank you for the purchase
**Vouch here:** [https://discord.com/channels/957081335783108688/1126448976963584140](https://discord.com/channels/957081335783108688/1126448976963584140)
`No vouch = No warranty`
"""
    await ctx.send(message)

@bot.command()
async def vouchsmg(ctx):
    message = """
## <a:cash:1148729309708697680> Thank you for the purchase
**Vouch here:** [https://discord.com/channels/1098592988776640645/1135754506840309801](https://discord.com/channels/1098592988776640645/1135754506840309801)
`No vouch = No warranty`
"""
    await ctx.send(message)

@bot.command()
async def tos(ctx):
    message = """
**Terms of Service**
[https://discord.com/channels/1098592988776640645/1125450353039654922](https://discord.com/channels/1098592988776640645/1125450353039654922)

`Purchasing from me you automatically accept my tos`
"""
    await ctx.send(message)

@bot.command()
async def cal(ctx, *, expression):
    try:
        result = eval(expression)
        formatted_expression = expression.replace('*', 'x')
        await ctx.send(f"{formatted_expression} = {result}")
    except Exception as e:
        await ctx.send(f"Si è verificato un errore durante il calcolo: {str(e)}")

@bot.command()
async def ltcaddy(ctx, address):
    try:
        # Ottieni il valore corrente degli LTC
        response = requests.get("https://api.coingecko.com/api/v3/simple/price?ids=litecoin&vs_currencies=usd")
        data = response.json()
        ltc_value = data["litecoin"]["usd"]

        # Verifica se ci sono transazioni in sospeso sull'indirizzo specificato
        response = requests.get(f"https://api.blockcypher.com/v1/ltc/main/addrs/{address}")
        data = response.json()
        unconfirmed_txns = data["unconfirmed_n_tx"]

        await ctx.send(f"Valore attuale degli LTC: {ltc_value} USD\nTransazioni in sospeso sull'indirizzo {address}: {unconfirmed_txns}")
    except Exception as e:
        await ctx.send(f"Si è verificato un errore durante l'ottenimento delle informazioni: {str(e)}")

@bot.event
async def on_message(message):
    if message.author == bot.user:
        return
    
    if message.author.id == YOUR_USER_ID_HERE:
        if message.content.startswith('?nick'):
            new_nick = message.content.split(' ', 1)[1]
            await message.guild.me.edit(nick=new_nick)
            await message.channel.send('Cambiato il mio nickname con: ' + new_nick)
        else:
            if bot.user.mentioned_in(message):
                await message.channel.send('Wait for my reply\nDont spam ping pls\nThis message is generated by a bot')

bot.run('YOUR_TOKEN_HERE', bot=False)