Z
Z
Zakkaru2021-09-12 15:16:32
Python
Zakkaru, 2021-09-12 15:16:32

How to make the code sent to the chat?

I'm making a nitro generator to entertain the server. I found the code on the internet but I can't make it so that the generated link is sent to the chat

@client.command()
async def k(ctx):
    code = "https://discord.gift/" + ('').join(random.choices(string.ascii_letters + string.digits, k=16))
    f = open('Codes.txt', "a+")
    f.write(f'{code}\n')
    f.close()
    print(f'[GENERATED] {code}')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2021-09-12
@DekuFX

await ctx.send(f'{code}')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question