func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
if !allowedChannels[m.ChannelID] && !whiteList[m.Author.ID] {
return
}
code
if strings.HasPrefix(m.Content, prefix) || strings.HasPrefix(m.Content, prefix1) || strings.HasPrefix(m.Content, prefix2) {
parts := strings.Split(m.Content, " ")
command := parts[0]
switch command {
case prefix2 + "ss":
if len(m.Message.Attachments) <= 0 {
return
}
IMGurl := m.Message.Attachments[0].URL
}
}
}
напиши скрипт чтобы изображение любого формата jpg png там чтобы оно превращалось в негативное изображнеие и можно было указать силу негатива !ss значение в цифрах
Assistant
To transform an image into a negative with a specified intensity, you can use the image and image/color packages in Go, along with an additional package to decode/encode images, such as github.com/nfnt/resize for resizing and github.com/disintegration/imaging for additional operations. The script below provides an example of how to achieve this: