repl.it
@pieromqwerty/

Discord YeetCoin Bot

Python

The official Repl.it and Github repositories for the Discord YeetCoin Bot.

fork
loading
Files
  • main.py
  • database_creation.py
  • keep_alive.py
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from discord.ext import commands
import os
from keep_alive import keep_alive

bot = commands.Bot(command_prefix='yeet ')
token = os.environ.get("DISCORD_BOT_SECRET")

def openArray():
    f = open("mainarray.txt","r")
    contents = f.read()
    return contents

def saveArray(array):
    f = open("mainarray.txt", "w+")
    f.write(array)
    f.close()

@bot.event
async def on_ready():
    print("I'm in")
    print(bot.user)

@bot.command()
async def hello(ctx):
    await ctx.send('I heard you! {0}'.format(ctx.author))

@bot.command()
async def arraytest(ctx):
    array = str(ctx.author.id)
    await ctx.send('Your id: ' + array) 

@bot.command()
async def argsTest(ctx, user):
    await ctx.send('The user you mentioned is: ' + user)
    #server = discord.Guild()
    id = user.id
    await ctx.send("The user's id who you mentioned is: " + str(id))

bot.run(token)
keep_alive()
?