Im attempting to make my bot send a random value of a specific field
#edit
@bot.command()
async def edit(ctx):
edit = db.edit.aggregate({ 'edit': { 'edit': 1 } })
await ctx.reply(edit)
Im attempting to make my bot send a random value of a specific field
#edit
@bot.command()
async def edit(ctx):
edit = db.edit.aggregate({ 'edit': { 'edit': 1 } })
await ctx.reply(edit)
You need to provide a lot more information, but if it's anything like a list of values you could just separate it using the .split method and then using random.choice() to pick a random value.
I would also recommend you consider using some sort of relational database eg SQL as it will better serve your needs.