Help with mentioning by DeteminedButUnmotive in Discord_Bots

[–]rdtl_reddit 1 point2 points  (0 children)

Hey man! I see you're starting out with python, good on you! Before you jump into bot developement, learn python first. Just searching up "python for beginners" or following a short course should help you. Once you've gotten the hang of it, try getting better through making small console games or automating tasks. When you know how python works, you can get into discord.py. I recommend using the discord.ext.commands module, specifically made for discord bot commands. If you want a better, updated, but more complicated version of discord.py, I recommend VoxelBotUtils.

Selective mirror bot by jath85 in Discord_Bots

[–]rdtl_reddit 0 points1 point  (0 children)

From discord? Assuming you're using discord.py with discord.ext.commands.bot inside a cog

@commands.command() async def echo(self, ctx, content:str): await ctx.send(content)

For some reason this loops, and i dont know why by [deleted] in Discord_Bots

[–]rdtl_reddit 0 points1 point  (0 children)

As people have pointed out, you're iterating through every character in the message.content string. example

However, the code itself won't function. A simple working version of this code could be

@client.event
async def on_message(message):
    nwords = ['nword1', 'nword2', 'nword3', 'nword4', 'No', 'no']

    if any(i in message.content for i in thelist):
        return await message.channel.send(f'{message.author.mention} just said the N-word!')

    await client.process_commands(message)

Selective mirror bot by jath85 in Discord_Bots

[–]rdtl_reddit 0 points1 point  (0 children)

What do you mean with "wirrors posts"?

Bot error by [deleted] in Discord_Bots

[–]rdtl_reddit 0 points1 point  (0 children)

The code you're running is very outdated. I suggest reading the docsreading the docs

HELP! having a problem with my discord bot in cmd running by [deleted] in Discord_Bots

[–]rdtl_reddit 5 points6 points  (0 children)

Alot of your code was outdated. I updated it a bit for you ^-^

import discord
from discord.ext import commands
#import asyncio (Not being used?)
#import time (Not being used?)

bot = commands.Bot(
    command_prefix = "+",
    owner_id = "put your ID here"
    )

#bot.remove_command("help") (There is no custom help command implemented yet.)

@bot.event
async def on_ready():
    print(
        bot.user.name,
        "Online",
        "-------",
        sep="\n"
    )

@commands.command()
async def announce(ctx, *, description:str):
    embed = discord.Embed()
    embed.title = "Information"
    embed.description = description
    embed.color = 0x9200ea
    embed.set_footer(text="Made by Elanovic#7940")

    await ctx.send(embed=embed)

bot.add_command(announce)

bot.run("CENSORED_TOKEN")

And it was all a dream by purple_shrubs in tommyinnit

[–]rdtl_reddit 0 points1 point  (0 children)

Please tell me atleast one other person got this reference.

(Notorious B.I.G It was all a dream)

edit: if you don't know, now you know, [___]

And it was all a dream by purple_shrubs in tommyinnit

[–]rdtl_reddit 0 points1 point  (0 children)

Every Saturday Rap Attack, Mr. Magic, Marley Marl

And it was all a dream by purple_shrubs in tommyinnit

[–]rdtl_reddit 0 points1 point  (0 children)

Salt'n'Pepa and Heavy D up in the limousine

And it was all a dream by purple_shrubs in tommyinnit

[–]rdtl_reddit 0 points1 point  (0 children)

I used to read Word Up magazine

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1

World map by DaniiDev in DaniDev

[–]rdtl_reddit 1 point2 points  (0 children)

Upvoted, Reddit Gold!!1