Console logs and region var
This commit is contained in:
@ -2,4 +2,10 @@
|
||||
DISCORD_TOKEN=""
|
||||
REPLICATE_API_TOKEN=""
|
||||
# Comma separated
|
||||
COOLDOWN_ALLOW_LIST=""
|
||||
COOLDOWN_ALLOW_LIST=""
|
||||
# S3
|
||||
BUCKET_NAME=
|
||||
AWS_ENDPOINT_URL_S3=
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_REGION=
|
@ -12,7 +12,6 @@ import (
|
||||
|
||||
func UploadToS3(filePath string) (*s3manager.UploadOutput, error) {
|
||||
bucket := os.Getenv("BUCKET_NAME")
|
||||
fmt.Println("The filepath is: ", filePath)
|
||||
if bucket == "" {
|
||||
fmt.Println("No S3 bucket specified, skipping upload.")
|
||||
return nil, nil
|
||||
@ -21,9 +20,10 @@ func UploadToS3(filePath string) (*s3manager.UploadOutput, error) {
|
||||
endpoint := os.Getenv("AWS_ENDPOINT_URL_S3")
|
||||
accessKeyID := os.Getenv("AWS_ACCESS_KEY_ID")
|
||||
secretAccessKey := os.Getenv("AWS_SECRET_ACCESS_KEY")
|
||||
region := os.Getenv("AWS_REGION")
|
||||
|
||||
sess, err := session.NewSession(&aws.Config{
|
||||
Region: aws.String("us-west-2"),
|
||||
Region: ®ion,
|
||||
Credentials: credentials.NewStaticCredentials(
|
||||
accessKeyID,
|
||||
secretAccessKey,
|
||||
|
1
main.go
1
main.go
@ -189,7 +189,6 @@ func (h *handler) cmdPic(ctx context.Context, data cmdroute.CommandData) *api.In
|
||||
|
||||
// Concatenate clean username and timestamp to form filename
|
||||
filename := data.Event.Sender().Username + "_" + timestamp + ".jpg"
|
||||
fmt.Println("The filename is: ", filename)
|
||||
|
||||
imageFile, err := lib.ReplicateImageGeneration(options.Prompt, filename)
|
||||
|
||||
|
Reference in New Issue
Block a user