Это видео недоступно.
Сожалеем об этом.

Save Images From Discord Chat Using a Bot

Поделиться
HTML-код
  • Опубликовано: 8 окт 2020
  • Hey welcome back, Ben again! Today is a video about how to make a discord bot that is able to save images from chat! I learned how to do this as I'm trying to work on a project that will (hopefully) incorporate Tensorflow Object Detection into a discord bot. I couldn't find many great examples of how to do this, so I thought I'd make my own! The base of the code came from a short example I found on stackoverflow, so original credit goes here: stackoverflow....
    Github repository for this project:
    github.com/Ben...
    Check out my Object-Detection series:
    • TensorFlow Object Dete...

Комментарии • 16

  • @LazyTech825
    @LazyTech825  3 года назад +16

    After doing more work on this project I realized that there is actually a built in method to save attachments (facepalm moment). If you want to do it using the built in way you can just use 'await ctx.message.attachments[0].save('image.jpg')' --> the 'image.jpg' can be changed to whatever name you'd like

  • @que_bic
    @que_bic 3 года назад +2

    도움이 되었습니다. 감사합니다. 앞으로도 이런 영상들을 올려주세요.
    Thanks. This video helped me. I wish you upload more videos like this.

  • @bloodboy21
    @bloodboy21 3 года назад +1

    Good video, it's really nice

  • @Aaron-yu6zo
    @Aaron-yu6zo 3 года назад +1

    It is very interesting, thank you.

  • @hektua
    @hektua 3 года назад +1

    'pip' is not recognized as an internal or external command,
    operable program or batch file.

  • @LawsaeFilms
    @LawsaeFilms 2 года назад +1

    Is there anyway to do this in javascript? I dont know coding but the other tutorial i followed to get my bot online used js for their base. I want to add this into theirs I just need what the command would be.

  • @mazleens
    @mazleens Год назад +2

    Thank you. Will you get banned for using this? (terms of service violation) What about 10.000 images, will discord kick me?

    • @LazyTech825
      @LazyTech825  Год назад +1

      You’d probably have to do some digging in their policies, but I’d imagine you’d probably get temporarily kicked or something like if you start doing massive data operations (like downloading 10,000 images)

  • @demotest3demotest381
    @demotest3demotest381 2 года назад +1

    how to save uploaded file to directory without any command?

    • @nikitali4180
      @nikitali4180 2 года назад

      You can use client.event instead of client.command()

  • @jacknicholson337
    @jacknicholson337 Год назад

    I got this error when i ran the code with absolutely no changes:
    Traceback (most recent call last):
    File "c:\Users\Jack\AppData\Local\Programs\Python\Python39\Python Projects\DiscordImageSaver\imagebot.py", line 6, in
    client=commands.Bot(command_prefix='.')
    TypeError: __init__() missing 1 required keyword-only argument: 'intents'
    I'm not sure what to do

    • @LazyTech825
      @LazyTech825  Год назад

      Looks like the api has been updated, try doing
      commands.Bot(command_prefix='.', Intents.all())
      let me know if this works or you need more help

    • @jacknicholson337
      @jacknicholson337 Год назад

      @@LazyTech825 thanks it works now. Is there a way to make all images that are sent to a channel automatically download to my PC without having to type .save

    • @LazyTech825
      @LazyTech825  Год назад

      Instead of having " async def save(ctx): " you could use " async def on_message(message): " which would activate any time there is a message sent in the chat. Within that function you could then set something up to see if the message has an attachment and then save it

  • @beng9305
    @beng9305 11 месяцев назад

    :D