Terisback / discord.v

Discord Bot Framework written in V
MIT License
120 stars 12 forks source link

hey #28

Closed mewzax closed 2 years ago

mewzax commented 2 years ago

i have an error:

PS C:\Users\Mewzax\Documents\Code\Vlang\Discord-Bot> v run .
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:83:10: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   81 | pub fn (f FormData) encode() string {
   82 |     mut builder := strings.new_builder(200)
   83 |     builder.write_b(`\n`)
      |             ~~~~~~~~~~~~~
   84 |     for k, v in f.fields {
   85 |         builder.write_string('--$f.boundary\n')
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:89:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   87 |             string {
   88 |                 builder.write_string("Content-Disposition: form-data; name=\"$k\"\n")
   89 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
   90 |                 builder.write_string(v)
   91 |                 builder.write_b(`\n`)
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:91:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   89 |                 builder.write_b(`\n`)
   90 |                 builder.write_string(v)
   91 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
   92 |             }
   93 |             FormFile {
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:91:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   89 |                 builder.write_b(`\n`)
   90 |                 builder.write_string(v)
   91 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
   92 |             }
   93 |             FormFile {
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:97:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   95 |                 builder.write_string('Content-Type: $v.content_type\n')
   96 |                 builder.write_string('Content-Transfer-Encoding: base64\n')
   97 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
   98 |                 builder.write_string(base64.encode(v.data))
   99 |                 builder.write_b(`\n`)
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:99:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   97 |                 builder.write_b(`\n`)
   98 |                 builder.write_string(base64.encode(v.data))
   99 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
  100 |             }
  101 |         }
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:99:13: warning: method `strings.Builder.write_b` has been deprecated since 2022-02-11, it will be an error after 2022-08-10; Use write_u8() instead
   97 |                 builder.write_b(`\n`)
   98 |                 builder.write_string(base64.encode(v.data))
   99 |                 builder.write_b(`\n`)
      |                         ~~~~~~~~~~~~~
  100 |             }
  101 |         }
C:/Users/Mewzax/.vmodules/terisback/discordv/rest.v:30:24: warning: function `math.mathutil.min` has been deprecated since 2022-01-19, it will be an error after 2022-07-18; use math.min instead
   28 |         values.add('before', query.before)
   29 |     }
   30 |     values.add('limit', m.min(m.max(1, query.limit), 100).str())
      |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |     return values.encode()
   32 | }
C:/Users/Mewzax/.vmodules/terisback/discordv/rest.v:30:30: warning: function `math.mathutil.max` has been deprecated since 2022-01-19, it will be an error after 2022-07-18; use math.max instead
   28 |         values.add('before', query.before)
   29 |     }
   30 |     values.add('limit', m.min(m.max(1, query.limit), 100).str())
      |                                 ~~~~~~~~~~~~~~~~~~~
   31 |     return values.encode()
   32 | }
C:/Users/Mewzax/.vmodules/terisback/discordv/rest.v:30:30: warning: function `math.mathutil.max` has been deprecated since 2022-01-19, it will be an error after 2022-07-18; use math.max instead
   28 |         values.add('before', query.before)
   29 |     }
   30 |     values.add('limit', m.min(m.max(1, query.limit), 100).str())
      |                                 ~~~~~~~~~~~~~~~~~~~
   31 |     return values.encode()
   32 | }
C:/Users/Mewzax/.vmodules/terisback/discordv/rest/formdata/formdata.v:98:40: error: cannot use `[]byte` as `[]u8` in argument 1 to `encoding.base64.encode`
   96 |                 builder.write_string('Content-Transfer-Encoding: base64\n')
   97 |                 builder.write_b(`\n`)
   98 |                 builder.write_string(base64.encode(v.data))
      |                                                    ~~~~~~
   99 |                 builder.write_b(`\n`)
  100 |             }
C:/Users/Mewzax/.vmodules/terisback/discordv/structs.v:692:24: error: type `byte` is an alias, use the original alias type `u8` instead
  690 | }
  691 |
  692 | pub type MessageFlag = byte
      |                        ~~~~
  693 |
  694 | pub const (
C:/Users/Mewzax/.vmodules/terisback/discordv/structs.v:785:27: error: cannot cast `int` to `byte` (alias to `u8`)
  783 |             }
  784 |             'flags' {
  785 |                 m.flags = MessageFlag(byte(v.int()))
      |                                       ~~~~~~~~~~~~~
  786 |             }
  787 |             else {}

can you help me pls ?

Terisback commented 2 years ago

cool, make a PR, I'm not currently available

mewzax commented 2 years ago

make a pr for an error?

Terisback commented 2 years ago

Make a PR to fix a problem

kkharji commented 2 years ago

Make a PR to fix a problem

i.e. pr that replaces deprecated methods with new methods

mewzax commented 2 years ago

i fixed my problem but do you guys have any idea on how to use it on windows 10 ?

Terisback commented 2 years ago

with WSL

mewzax commented 2 years ago

with WSL

and without a subsystem ?

Terisback commented 2 years ago

and without a subsystem ?

I guess you cannot install it without selling your soul

mewzax commented 2 years ago

😭