Giter VIP home page Giter VIP logo

Comments (13)

TotallyNotAHaxxer avatar TotallyNotAHaxxer commented on August 26, 2024 1

Of course! happy coding :) and yeah i think alot of people are quite new, i am for sure but been learning alot of new cool stuff like that filename.close

i was writing a exploitation tool for web applications, and when opening a file or closing it in a for loop sometimes even outside using defer filename.close() it kept saying the file was already closed, or sometimes the file would not even load. so ofc me being geeky i brute forced my own mental list finding every possible solution until i got a code suggestion for the code, which not only took away the underscore of yellow but also removed ALOT of bugs

still to this day amazes me how much a small line of code can either save and or ruin your code

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024 1

Of course! happy coding :) and yeah i think alot of people are quite new, i am for sure but been learning alot of new cool stuff like that filename.close

i was writing a exploitation tool for web applications, and when opening a file or closing it in a for loop sometimes even outside using defer filename.close() it kept saying the file was already closed, or sometimes the file would not even load. so ofc me being geeky i brute forced my own mental list finding every possible solution until i got a code suggestion for the code, which not only took away the underscore of yellow but also removed ALOT of bugs

still to this day amazes me how much a small line of code can either save and or ruin your code

Agreed! This stuff really is amazing!

from discord-mass-dm-go.

smugvee avatar smugvee commented on August 26, 2024 1

Hey @dox-net this can mean multiple things. Basically, your message.json file is not of proper format. If you send me the message.json I can help you figuring it out.

Sorry I forgot github was a thing, but yeah I figured out what was wrong a few minutes after making this
I didn't add a message to the config file and thats why it was giving the error
and if i hadn't figured it out i bet this thread would have helped me a lot, so thanks for that :)

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

Hey @dox-net this can mean multiple things. Basically, your message.json file is not of proper format. If you send me the message.json I can help you figuring it out.

from discord-mass-dm-go.

adr-iova avatar adr-iova commented on August 26, 2024

Hey @dox-net this can mean multiple things. Basically, your message.json file is not of proper format. If you send me the message.json I can help you figuring it out.

i tried with your content from message.json and i receive.

Error while Unmarshalling Message - Please make sure your Embed colour is a decimal number and not a Hex. Also please make sure you're using the right kind of quotes " and not ' (You can add it to notepad and use Ctrl + H to replace all quotes with the right ones) and use escape characters (backslash n) to add new lines instead of EOF

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

Hey @dox-net this can mean multiple things. Basically, your message.json file is not of proper format. If you send me the message.json I can help you figuring it out.

i tried with your content from message.json and i receive.

Error while Unmarshalling Message - Please make sure your Embed colour is a decimal number and not a Hex. Also please make sure you're using the right kind of quotes " and not ' (You can add it to notepad and use Ctrl + H to replace all quotes with the right ones) and use escape characters (backslash n) to add new lines instead of EOF

The default message works fine, could you join the support server and find QampingRunner#9680 in #support or attach your message.json files here?

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

Any response both of you?

from discord-mass-dm-go.

Knepala avatar Knepala commented on August 26, 2024

Hi, I have the same problem.

Trying to test out, I have added a single userid to members.id text and I want to send them the default message.json.

I have exactly the same scenario happening to me.

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

Run from binary not from go run main.go

from discord-mass-dm-go.

TotallyNotAHaxxer avatar TotallyNotAHaxxer commented on August 26, 2024

i dont think it matters what file your running from, coming from heafty go development it really does not make a change exe or not

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

i dont think it matters what file your running from, coming from heafty go development it really does not make a change exe or not
@ArkAngeL43

I respect that. But I would say, in this case, it would make a difference.

var config Config
	ex, err := os.Executable()
	if err != nil {
		return
	}
	ex = filepath.ToSlash(ex)
	file, err := os.Open(path.Join(path.Dir(ex) + "/" + "config.json"))
	if err != nil {
		return
	}
	defer file.Close()
	bytes, _ := io.ReadAll(file)
	errr := json.Unmarshal(bytes, &config)
	if errr != nil {
		fmt.Println(err)
		return
	}

This is for example, how I get the information from the config.
Preview 1
Here I have printed out the path of the exe when I run it using the compiled exe.
Preview 2
Here I have printed out the path of the exe when I run it using go run main.go

In this case, a temporary exe was made in some folder which does not have config, message, tokens, memberids like I have them in the folder on the desktop. Hence my program in particular will fall to work with go run main.go

If you have any suggestions about using some other way of opening files, feel free to comment. You may even change it and do a PR.
It might not matter in other programs, but in DMDGO as of now, it does matter.

from discord-mass-dm-go.

TotallyNotAHaxxer avatar TotallyNotAHaxxer commented on August 26, 2024

ah i can see that now also here is a suggestion, i noticed you used

defer file.Close() 

idk why but its just a suggestion to not have warnings sitting there is to use

filename.Close()

i know it seems like im being petty but im not its just- a suggestion ill look more at it when i have the time, thank you for clearning that up a bit form me

from discord-mass-dm-go.

V4NSH4J avatar V4NSH4J commented on August 26, 2024

ah i can see that now also here is a suggestion, i noticed you used

defer file.Close() 

idk why but its just a suggestion to not have warnings sitting there is to use

filename.Close()

i know it seems like im being petty but im not its just- a suggestion ill look more at it when i have the time, thank you for clearning that up a bit form me

Thanks for the suggestion! I'll implement it in this update :) I'm new to GO so I've still got a lot of learning to do haha

from discord-mass-dm-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.