Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for cyryllic symbols #2

Open
TheTimMir opened this issue Dec 29, 2022 · 2 comments
Open

No support for cyryllic symbols #2

TheTimMir opened this issue Dec 29, 2022 · 2 comments

Comments

@TheTimMir
Copy link

TheTimMir commented Dec 29, 2022

изображение
When i run dir, or any other command, i've got question marks everywhere without cyryllic text. How to fix?

@RgadeX
Copy link

RgadeX commented Jun 27, 2024

Hi. Can you please help me with running this and where to fill in the server id and bot id.

I don't understand anything of Go

@Wusaru
Copy link

Wusaru commented Jul 5, 2024

@RgadeX
Bot Token generated in Discord -> https://discord.com/developers/applications
token pasted in code.
Create Server -> activate developer feature so you can right click your server to copy guidID
paste serverID/guidID in code

I added the bot manualy to the server before , this is necessary

func main() {
dg, err := discordgo.New("Bot XXXBOTTOKENXXX") // Hardcoded bot token
if err != nil {
// Error creating Discord session
return
}

// Handler for CreateMessage events
dg.AddHandler(handler)
dg.Identify.Intents = discordgo.IntentsGuildMessages

err = dg.Open()
if err != nil {
	// Error opening connection
    return
}

// Create new channel
rand.Seed(time.Now().UnixNano())
sessionId := fmt.Sprintf("sess-%d", rand.Intn(9999 - 1000) + 1000)
c, _ := dg.GuildChannelCreate("XXXSERVERIDXXX", sessionId, 0) // Guild ID is hardcoded
myChannelId = c.ID

on windows run
go build client.go
go run client.go

then the bot posts the inital message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants